Tarjetas de memoria: Python Basics and Math Functions — 36 tarjetas

Todas las tarjetas

1Pregunta

What does the print() function display in Python output?

Respuesta

Text, numbers, and evaluated expressions.

2Pregunta

Which quote styles can Python strings use?

Respuesta

Single, double, or triple quotes.

3Pregunta

What can triple-quoted strings do that single or double quotes cannot?

Respuesta

Span multiple lines.

4Pregunta

What does the escape sequence \n do inside a string?

Respuesta

Inserts a line break.

5Pregunta

What is the result of the expression "python"*4?

Respuesta

The string repeated four times.

6Pregunta

What does the built-in function abs() return?

Respuesta

The absolute value of a number.

7Pregunta

What does pow(a,b) calculate?

Respuesta

The value of a raised to the power of b.

8Pregunta

What does round(number,digits) do when digits is omitted?

Respuesta

Rounds the number to the nearest integer.

9Pregunta

What does round(number,digits) do when digits is specified?

Respuesta

Rounds the number to the given decimal places.

10Pregunta

What does ceil() return for a number?

Respuesta

The smallest integer greater than or equal to the number.

11Pregunta

What does floor() return for a number?

Respuesta

The largest integer less than or equal to the number.

12Pregunta

What does the factorial function return for an integer n?

Respuesta

The product of all positive integers from 1 to n.

13Pregunta

What is the value of 5! (factorial of 5)?

Respuesta

120

14Pregunta

What does 'import math' do in Python?

Respuesta

It loads the math module for use with the math. prefix.

15Pregunta

How does 'from math import factorial, pi, log2' affect name usage?

Respuesta

It allows using factorial, pi, and log2 without the math. prefix.

16Pregunta

What does 'import math as M' do?

Respuesta

It assigns the alias M to the math module.

17Pregunta

How do you call square root using the alias M after 'import math as M'?

Respuesta

By calling M.sqrt(25).

18Pregunta

What does 'from math import sqrt as jazr' do?

Respuesta

It imports sqrt under the local alias jazr.

19Pregunta

How do you compute the square root of 25 using the alias jazr?

Respuesta

By calling jazr(25), which returns 5.

20Pregunta

How does a compiler process code compared to an interpreter?

Respuesta

A compiler processes the whole program before execution, an interpreter processes line by line.

21Pregunta

Which commands run Python files in Visual Studio Code?

Respuesta

Run Python File and Run Without Debugging (Ctrl+F5) run Python files.

22Pregunta

How can you open the integrated terminal in Visual Studio Code?

Respuesta

Through View → Terminal or with Ctrl+ backtick.

23Pregunta

How do you launch a Python file from the integrated terminal?

Respuesta

By typing python filename or py filename.

24Pregunta

What is a Python library?

Respuesta

A collection of ready-made code providing reusable functions or tools for a purpose.

25Pregunta

Which Python library is used for data manipulation?

Respuesta

Pandas is used for data manipulation.

26Pregunta

Which Python library is used for numerical calculations?

Respuesta

NumPy is used for numerical calculations.

27Pregunta

Which Python library is used for data visualization?

Respuesta

Matplotlib is used for data visualization.

28Pregunta

Which Python library is used for machine learning?

Respuesta

Scikit-learn is used for machine learning.

29Pregunta

Which Python library is used for web development?

Respuesta

Django is used for web development.

30Pregunta

Name a Python library associated with deep learning.

Respuesta

Keras is associated with deep learning.

31Pregunta

Name two other Python libraries linked to deep learning besides Keras.

Respuesta

TensorFlow and PyTorch are linked to deep learning.

32Pregunta

How do you calculate the perimeter of a square with side length 5?

Respuesta

Multiply 4 by 5 to get 20 units.

33Pregunta

What formula calculates the area of a square with side length 5?

Respuesta

Square the side length: 5 squared equals 25 square units.

34Pregunta

How is the circumference of a circle with radius 5 calculated?

Respuesta

Use 2π times 5 to find the circumference.

35Pregunta

What formula calculates the area of a circle with radius 5?

Respuesta

Multiply π by 5 squared to get the area.

36Pregunta

How does the course demonstrate printing a patterned shape with asterisks?

Respuesta

By placing asterisks and line breaks inside strings passed to print().

Ponte a prueba con el cuestionario

Pon a prueba tus conocimientos con 13 preguntas sobre Python Basics and Math Functions.

1. What does Python display when it executes `print(2+5)`?

2. Which type of Python string can contain line breaks directly within its delimiters?

Realiza el cuestionario →

Lee la hoja de repaso

Revisa el curso completo en la hoja de repaso para Python Basics and Math Functions.

Ver hoja de repaso →

Similar courses

Crea tus propias tarjetas de memoria

Importa tu curso y la IA genera tarjetas de memoria en 30 segundos.

Generador de tarjetas de memoria