Logo

Programming - PYTHON 1

¿Listo para explorar más? Descubre mazos de tarjetas similares en este dominio y temas relacionados.

60 preguntas
May 27, 2025

Pregunta 1

How do you create a new file in Python IDLE?

Respuesta

Click on file, then new file.

Pregunta 2

What happens if you type below the three arrows?

Respuesta

Your document will get lost.

Pregunta 3

What does the print function do?

Respuesta

It prints something for the user to read.

Pregunta 4

How do you display 'Hello World' using print?

Respuesta

Use print('Hello World').

Pregunta 5

What does Python's case sensitivity imply?

Respuesta

You must type things exactly as written.

Pregunta 6

What does 'unexpected indent' mean?

Respuesta

It indicates there is a space between the margin and your code.

Pregunta 7

How can you fix the indentation error?

Respuesta

Backspace your code to align it with the left margin.

Pregunta 8

What does EOF unexpected error indicate?

Respuesta

It indicates a missing bracket.

Pregunta 9

What does EOL while scanning string literal mean?

Respuesta

There is a missing quotation mark.

Pregunta 10

How do you create a new line in print?

Respuesta

Use print('this is a new line:\n').

Pregunta 11

How do you create a tab space in print?

Respuesta

Use print('this is a tab:\t it leaves a space').

Pregunta 12

What is the purpose of the input function?

Respuesta

It is used to interact with the user for inputting information.

Pregunta 13

What is a variable in Python?

Respuesta

A space in memory used to store data.

Pregunta 14

How do you create a variable?

Respuesta

By assigning it a name, like userinput=input('insert something here').

Pregunta 15

What is the function to print user input?

Respuesta

Use print(userinput).

Pregunta 16

What must be the first character of a variable?

Respuesta

It must start with a letter.

Pregunta 17

Can variable names have spaces?

Respuesta

No, spaces will cause an error.

Pregunta 18

What character can be used in place of spaces in variable names?

Respuesta

You can use underscores (_).

Pregunta 19

What are the main data types in Python?

Respuesta

String, Integer, Float, and Boolean.

Pregunta 20

How are strings defined?

Respuesta

Strings are enclosed in quotes.

Pregunta 21

What type of number is 3?

Respuesta

It is an integer.

Pregunta 22

What is a float?

Respuesta

A number with a decimal place.

Pregunta 23

What does Boolean represent?

Respuesta

A true or false value.

Pregunta 24

How can you identify a string versus an integer?

Respuesta

Strings are in quotes; integers are not.

Pregunta 25

What happens if you try to do math with a string?

Respuesta

You cannot perform math operations on a string.

Pregunta 26

What does input automatically convert?

Respuesta

Input converts values into strings.

Pregunta 27

What is casting in Python?

Respuesta

It's converting one data type to another.

Pregunta 28

How do you convert a string to an integer?

Respuesta

Use int() function like int(input('33')).

Pregunta 29

What does a hashtag before code indicate?

Respuesta

It designates a comment which is ignored by Python.

Pregunta 30

What can comments serve as?

Respuesta

They can act as reminders or hide code.

Pregunta 31

How do you print mixed variables?

Respuesta

Combine variables and strings using the print function.

Pregunta 32

What is sequential programming?

Respuesta

It's when code runs in a specific order.

Pregunta 33

What does concatenation do?

Respuesta

It adds strings together.

Pregunta 34

How do you concatenate strings in Python?

Respuesta

Use the + operator.

Pregunta 35

What will the output be of print(firstname + surname)?

Respuesta

It will print JuliaRoebuck without a space.

Pregunta 36

How can you add a space between concatenated strings?

Respuesta

Concatenate a space like print(firstname + ' ' + surname).

Pregunta 37

Is 'userinput' a valid variable name?

Respuesta

Yes, it starts with a letter and has no spaces.

Pregunta 38

What is the correct way to use input for age?

Respuesta

age = int(input('What is your age?')).

Pregunta 39

What will print('You are ', age, 'years old') output?

Respuesta

It displays the user's age in a sentence.

Pregunta 40

What should you remember about variable names?

Respuesta

They must be consistent in case sensitivity.

Pregunta 41

How does Python identify reserved keywords?

Respuesta

They automatically turn purple in the editor.

Pregunta 42

What does a missing closing bracket lead to?

Respuesta

An EOF unexpected error.

Pregunta 43

What type is '33' in quotes?

Respuesta

It's a string.

Pregunta 44

What do you receive from int((input('33')))?

Respuesta

It converts '33' from a string to an integer.

Pregunta 45

What is the result of mixing variable types?

Respuesta

It can combine numbers and text in print statements.

Pregunta 46

What happens if you miss a quotation mark?

Respuesta

An EOL while scanning string literal error occurs.

Pregunta 47

Are comments run by Python?

Respuesta

No, comments are ignored by the interpreter.

Pregunta 48

How do you indicate an indentation error?

Respuesta

It is usually flagged by Python as 'unexpected indent'.

Pregunta 49

What is the output of 'print("Hello World")'?

Respuesta

Hello World.

Pregunta 50

Can comments be used for reminders?

Respuesta

Yes, they can act as reminders in the code.

Pregunta 51

Why do we need to backspace code?

Respuesta

To correct indentation issues.

Pregunta 52

What is indicated by the term 'input' being purple?

Respuesta

It signifies that 'input' is a reserved keyword.

Pregunta 53

How do you define a string variable?

Respuesta

For example, firstname = 'Julia'.

Pregunta 54

Can you perform mathematical operations on strings?

Respuesta

No, mathematical operations cannot be performed on strings.

Pregunta 55

How should variable names be structured?

Respuesta

They should not contain spaces and be case consistent.

Pregunta 56

What will result from incorrect indentation?

Respuesta

You will encounter indentation errors.

Pregunta 57

What does Python automatically do with input?

Respuesta

It treats all input as strings.

Pregunta 58

What does print(userinput) do?

Respuesta

It outputs whatever the user entered.

Pregunta 59

Why is it important to close brackets?

Respuesta

Every open bracket needs a corresponding closing bracket.

Pregunta 60

What is the format for creating a variable with user input?

Respuesta

userinput = input('insert something here').

¿Algo no funciona?Cuéntanos

Publicidad

Apoya nuestro generador gratuito de flashcards viendo este anuncio.

La publicidad ayuda a mantener CardSnap gratis para todos

Cómo funciona

Sigue estos sencillos pasos para crear tus flashcards personalizadas.

  1. Sube un archivo: Sube un archivo con tus apuntes. Puede ser Word, PDF o TXT.
  2. Genera el PDF: Generamos un PDF con flashcards formateadas en el idioma del documento subido. Este proceso puede tardar más de 30 segundos según el tamaño del archivo.
  3. Imprime y estudia: Imprime a doble cara y recorta. Empieza a estudiar offline, en cualquier momento.

    Estudia en línea: Visualiza y practica tus flashcards interactivamente en nuestra app web. Añádela a favoritos para volver cuando quieras.

¿Listo para empezar? ¡Crea tu primer mazo de flashcards ahora!

Publicidad

Apoya nuestro generador gratuito de flashcards viendo este anuncio.

La publicidad ayuda a mantener CardSnap gratis para todos

Míralo en acción

Una subida sencilla. Una transformación inteligente. Un PDF imprimible de flashcards — así de fácil.

Mira nuestro tutorial para aprender cómo usar CardSnap de manera efectiva

Publicidad

Apoya nuestro generador gratuito de flashcards viendo este anuncio.

La publicidad ayuda a mantener CardSnap gratis para todos

¿Por qué creé esto?

Descubre la historia detrás de CardSnap y nuestra misión de hacer el aprendizaje accesible.

Un día, mi hija me pidió ayuda para estudiar un examen de ciencias. Pensé, “¿No sería más fácil si tuviera flashcards?”

Así que construí esta pequeña herramienta para convertir sus apuntes en tarjetas imprimibles — de forma rápida y sencilla.

Funcionó. Y ahora la comparto por si a alguien más le ayuda a estudiar mejor.

Únete a miles de estudiantes y profesores que confían en CardSnap para sus necesidades de aprendizaje

Publicidad

Apoya nuestro generador gratuito de flashcards viendo este anuncio.

La publicidad ayuda a mantener CardSnap gratis para todos