Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 4 fuera de 86 páginas
Examen

CMN 152V - Introduction to Python / Python Basics Study Guide Comprehensive Resource To Help You Ace Exams Includes Frequently Tested Questions With ELABORATED 100% Correct COMPLETE SOLUTIONS Guaranteed Pass First Attempt!! Current Upda

Document preview thumbnail
Vista previa 4 fuera de 86 páginas

CMN 152V - Introduction to Python / Python Basics Study Guide Comprehensive Resource To Help You Ace Exams Includes Frequently Tested Questions With ELABORATED 100% Correct COMPLETE SOLUTIONS Guaranteed Pass First Attempt!! Current Update!! Instant Download Pdf 1. How do you write pi in Python? Correct Answer: 2. How do you write e in Python? Correct Answer: math.e 3. How do you gain access to a module’s functionality in Python? Correct Answer: import it Example: import math 4. If you do not use print(), what output will you normally see when running code? Correct Answer: the last output in the block 5. Which function is used to display output in Python? Correct Answer: print() 6. Write an example of assigning a value to a variable. Correct Answer: x = 6 7. Can an underscore (_) be used at the beginning of a variable name? Correct Answer: yes 8. Is _x a valid variable name in Python? Correct Answer: yes 9. Can some names not be used as variables in Python? Correct Answer: yes 10. Give an example of a name that should not be used as a variable. Correct Answer: math 11. Which function is used to determine the type of a value? Correct Answer: type() 12. What data type is the value 1? Correct Answer: integer int 13. What data type is the value 1.0? Correct Answer: float 14. What data type is produced by 3 + 5.0? Correct Answer: float 15. What is a value enclosed in quotation marks (' ') called? Correct Answer: string str 16. What is the Boolean data type called in Python? Correct Answer: bool 17. What is the result of not False? Correct Answer: True 18. What is the result of not not False? Correct Answer: False 19. Which function is used to find the length of a string? Correct Answer: len() 20. How would you print the length of a string? Correct Answer: print(len())

Vista previa del contenido

CMN 152V - Introduction to Python / Python Basics

Study Guide Comprehensive Resource To Help You Ace
2026-2027 Exams Includes Frequently Tested Questions
With ELABORATED 100% Correct COMPLETE SOLUTIONS

Guaranteed Pass First Attempt!! Current Update!!

Instant Download Pdf



1. How do you write pi in Python?
Correct Answer: math.pi

2. How do you write e in Python?
Correct Answer: math.e

3. How do you gain access to a module’s functionality in Python?
Correct Answer: import it
Example: import math

4. If you do not use print(), what output will you normally see when running
code?
Correct Answer: the last output in the block

5. Which function is used to display output in Python?
Correct Answer: print()

6. Write an example of assigning a value to a variable.
Correct Answer: x = 6

7. Can an underscore (_) be used at the beginning of a variable name?
Correct Answer: yes

,8. Is _x a valid variable name in Python?
Correct Answer: yes

9. Can some names not be used as variables in Python?
Correct Answer: yes

10. Give an example of a name that should not be used as a variable.
Correct Answer: math

11. Which function is used to determine the type of a value?
Correct Answer: type()

12. What data type is the value 1?
Correct Answer: integer
int

13. What data type is the value 1.0?
Correct Answer: float

14. What data type is produced by 3 + 5.0?
Correct Answer: float

15. What is a value enclosed in quotation marks (' ') called?
Correct Answer: string
str

16. What is the Boolean data type called in Python?
Correct Answer: bool

17. What is the result of not False?

, Correct Answer: True

18. What is the result of not not False?
Correct Answer: False

19. Which function is used to find the length of a string?
Correct Answer: len()

20. How would you print the length of a string?
Correct Answer: print(len())

21. What can you use if a string contains quotation marks?
Correct Answer: ''' '''

22. Which keyword is used to check whether something exists inside
another value?
Correct Answer: in

23. What is the output of:
print('H' in 'Hello')
Correct Answer: True
24. What does format() do when used with curly brackets {} in a string?
Correct Answer: it replaces the curly brackets with whatever variable is
inside format()

25. What is the term used for replacing values inside a string with format()?
Correct Answer: string interpolation

26. What is the output of the following code?

name = 'deb'

, print('Hello {}'.format(name))

Correct Answer: Hello deb

27. What is the output of:

print('Hello' + ' ' + 'World')

Correct Answer: Hello World

28. What is the output of:

print('comma ' * 3 + 'chameleon')

Correct Answer:
comma comma comma chameleon

29. Which operator is used to test if two values are equal?
Correct Answer: ==

30. Which operator is used to test if two values are not equal?
Correct Answer: !=

31. What type of collection is created using square brackets [ ]?
Correct Answer: a list

32. How do you retrieve an item from a list?
Correct Answer:
print(highways[1])

33. What number do list indexes start at in Python?
Correct Answer: 0

Información del documento

Subido en
16 de mayo de 2026
Número de páginas
86
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$15.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Vendido
277
Seguidores
87
Artículos
3196
Última venta
2 días hace


Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes