Flashcards: Python Data Import and Plotting — 36 cards

All cards

1Question

What is the basis of Python's simple syntax?

Answer

Indentation rather than symbols.

2Question

Since when has Python been developed?

Answer

Since 1989.

3Question

How can Python be used online?

Answer

With the Python laboratory.

4Question

Name two Python distributions mentioned.

Answer

E-dypthon and Anaconda.

5Question

Which two Python applications does this course focus on?

Answer

Importing data and representing data graphically.

6Question

How is a data table organized?

Answer

Into rows and columns.

7Question

How many columns does the course data table commonly contain?

Answer

Two columns.

8Question

What separators can a data file use for decimal values?

Answer

A comma or a point.

9Question

What must be identified before importing a data file?

Answer

The separator format between integer and decimal parts.

10Question

What lines must be identified before importing a file?

Answer

The number of lines to ignore, including headings or units.

11Question

What columns must be identified before importing a file?

Answer

The columns to import.

12Question

What is the name of the example data file?

Answer

donnees.txt.

13Question

How are measurements arranged in the example data file?

Answer

In columns such as t, x, and y with units on a separate line.

14Question

What does numpy.loadtxt() do?

Answer

It loads numerical data from a text file into a NumPy array.

15Question

What does the dtype parameter specify in numpy.loadtxt()?

Answer

The data type for the imported values.

16Question

What is the role of the delimiter parameter in numpy.loadtxt()?

Answer

It defines the character separating columns in the data file.

17Question

What does the skiprows parameter control in numpy.loadtxt()?

Answer

The number of lines to skip at the start of the file.

18Question

What does the usecols parameter do in numpy.loadtxt()?

Answer

It selects which columns to import from the file.

19Question

What does the comments parameter identify in numpy.loadtxt()?

Answer

Characters that mark the start of comments in the file.

20Question

What is the purpose of the converters parameter in numpy.loadtxt()?

Answer

To convert character strings into numbers during import.

21Question

What happens when unpack=True in numpy.loadtxt()?

Answer

Data is returned in separate columns as individual arrays.

22Question

What is matplotlib.pyplot in Python?

Answer

A library module for graphical data representation including point clouds.

23Question

What are the main steps in a basic graphing program using matplotlib?

Answer

Import NumPy and matplotlib.pyplot, load data, plot, label, and display.

24Question

Which function sets the graph axes in matplotlib?

Answer

The axis() function.

25Question

Which function adds a graph title in matplotlib?

Answer

The title() function.

26Question

Which functions label the horizontal and vertical axes in matplotlib?

Answer

xlabel() labels horizontal and ylabel() labels vertical axes.

27Question

What does the legend() function do in matplotlib?

Answer

It displays the graph legend.

28Question

What is the purpose of the show() function in matplotlib?

Answer

It displays the graphs on screen.

29Question

What does plt.plot(x, y, 'o-', color="red", marker="o", linewidth=1, label="vitesse") create?

Answer

A red point-and-line plot labeled vitesse.

30Question

What does the plot() function do with x and y lists?

Answer

It places points or connects their abscissas and ordinates.

31Question

Which parameters customize the plot() function's display?

Answer

Color, label, and marker parameters.

32Question

What does the quiver() function draw?

Answer

Vectors using origin coordinates and vector components.

33Question

Which inputs does quiver() use to draw vectors?

Answer

Origin coordinates x and y, vector components, and display parameters.

34Question

What velocity vectors are used in the example to draw three vectors?

Answer

vx=[0.007, 0.013, 0.019] and vy=[0.002, 0.002, -0.001].

35Question

What origin coordinates are used in the example for drawing vectors?

Answer

ax=[0.0, 0.02, 0.04] and ay=[1.503, 1.507, 1.505].

36Question

What does the completed matplotlib graph represent?

Answer

The trajectory of a falling ball with velocity vectors.

Test yourself with the quiz

Test your knowledge with 14 questions on Python Data Import and Plotting.

1. What structural feature does Python use to define blocks of code?

2. Which pair of applications is emphasized for Python in physics and chemistry?

Take the quiz →

Read the revision sheet

Review the complete course in the revision sheet for Python Data Import and Plotting.

See revision sheet →

Similar courses

Create your own flashcards

Import your course and AI generates flashcards in 30 seconds.

Flashcard generator