Logo

Programming - PYTHON 1

Prêt à explorer plus ? Découvrez des jeux de fiches similaires dans ce domaine et des sujets connexes.

60 questions
May 27, 2025

Question 1

How do you create a new file in Python IDLE?

Réponse

Click on file, then new file.

Question 2

What happens if you type below the three arrows?

Réponse

Your document will get lost.

Question 3

What does the print function do?

Réponse

It prints something for the user to read.

Question 4

How do you display 'Hello World' using print?

Réponse

Use print('Hello World').

Question 5

What does Python's case sensitivity imply?

Réponse

You must type things exactly as written.

Question 6

What does 'unexpected indent' mean?

Réponse

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

Question 7

How can you fix the indentation error?

Réponse

Backspace your code to align it with the left margin.

Question 8

What does EOF unexpected error indicate?

Réponse

It indicates a missing bracket.

Question 9

What does EOL while scanning string literal mean?

Réponse

There is a missing quotation mark.

Question 10

How do you create a new line in print?

Réponse

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

Question 11

How do you create a tab space in print?

Réponse

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

Question 12

What is the purpose of the input function?

Réponse

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

Question 13

What is a variable in Python?

Réponse

A space in memory used to store data.

Question 14

How do you create a variable?

Réponse

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

Question 15

What is the function to print user input?

Réponse

Use print(userinput).

Question 16

What must be the first character of a variable?

Réponse

It must start with a letter.

Question 17

Can variable names have spaces?

Réponse

No, spaces will cause an error.

Question 18

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

Réponse

You can use underscores (_).

Question 19

What are the main data types in Python?

Réponse

String, Integer, Float, and Boolean.

Question 20

How are strings defined?

Réponse

Strings are enclosed in quotes.

Question 21

What type of number is 3?

Réponse

It is an integer.

Question 22

What is a float?

Réponse

A number with a decimal place.

Question 23

What does Boolean represent?

Réponse

A true or false value.

Question 24

How can you identify a string versus an integer?

Réponse

Strings are in quotes; integers are not.

Question 25

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

Réponse

You cannot perform math operations on a string.

Question 26

What does input automatically convert?

Réponse

Input converts values into strings.

Question 27

What is casting in Python?

Réponse

It's converting one data type to another.

Question 28

How do you convert a string to an integer?

Réponse

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

Question 29

What does a hashtag before code indicate?

Réponse

It designates a comment which is ignored by Python.

Question 30

What can comments serve as?

Réponse

They can act as reminders or hide code.

Question 31

How do you print mixed variables?

Réponse

Combine variables and strings using the print function.

Question 32

What is sequential programming?

Réponse

It's when code runs in a specific order.

Question 33

What does concatenation do?

Réponse

It adds strings together.

Question 34

How do you concatenate strings in Python?

Réponse

Use the + operator.

Question 35

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

Réponse

It will print JuliaRoebuck without a space.

Question 36

How can you add a space between concatenated strings?

Réponse

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

Question 37

Is 'userinput' a valid variable name?

Réponse

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

Question 38

What is the correct way to use input for age?

Réponse

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

Question 39

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

Réponse

It displays the user's age in a sentence.

Question 40

What should you remember about variable names?

Réponse

They must be consistent in case sensitivity.

Question 41

How does Python identify reserved keywords?

Réponse

They automatically turn purple in the editor.

Question 42

What does a missing closing bracket lead to?

Réponse

An EOF unexpected error.

Question 43

What type is '33' in quotes?

Réponse

It's a string.

Question 44

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

Réponse

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

Question 45

What is the result of mixing variable types?

Réponse

It can combine numbers and text in print statements.

Question 46

What happens if you miss a quotation mark?

Réponse

An EOL while scanning string literal error occurs.

Question 47

Are comments run by Python?

Réponse

No, comments are ignored by the interpreter.

Question 48

How do you indicate an indentation error?

Réponse

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

Question 49

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

Réponse

Hello World.

Question 50

Can comments be used for reminders?

Réponse

Yes, they can act as reminders in the code.

Question 51

Why do we need to backspace code?

Réponse

To correct indentation issues.

Question 52

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

Réponse

It signifies that 'input' is a reserved keyword.

Question 53

How do you define a string variable?

Réponse

For example, firstname = 'Julia'.

Question 54

Can you perform mathematical operations on strings?

Réponse

No, mathematical operations cannot be performed on strings.

Question 55

How should variable names be structured?

Réponse

They should not contain spaces and be case consistent.

Question 56

What will result from incorrect indentation?

Réponse

You will encounter indentation errors.

Question 57

What does Python automatically do with input?

Réponse

It treats all input as strings.

Question 58

What does print(userinput) do?

Réponse

It outputs whatever the user entered.

Question 59

Why is it important to close brackets?

Réponse

Every open bracket needs a corresponding closing bracket.

Question 60

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

Réponse

userinput = input('insert something here').

Quelque chose ne va pas ?Dites-le nous

Publicité

Soutenez notre générateur de fiches gratuit en regardant cette publicité.

La publicité aide à garder CardSnap gratuit pour tout le monde

Comment ça marche

Suivez ces étapes simples pour créer vos fiches personnalisées.

  1. Téléversez un fichier : Téléversez un fichier contenant vos notes. Il peut s'agir d'un fichier Word, PDF ou TXT.
  2. Générez un PDF : Nous générons un PDF avec des fiches formatées dans la langue du document téléchargé. Ce processus peut prendre plus de 30 secondes selon la taille du document.
  3. Imprimez et étudiez : Imprimez en recto verso et découpez. Commencez à réviser hors ligne, à tout moment.

    Étudiez en ligne : Affichez et entraînez-vous avec vos fiches de manière interactive dans notre application web. Ajoutez la page à vos favoris pour y revenir à tout moment.

Prêt à commencer ? Créez votre premier jeu de fiches maintenant !

Publicité

Soutenez notre générateur de fiches gratuit en regardant cette publicité.

La publicité aide à garder CardSnap gratuit pour tout le monde

Voyez-le en action

Un simple téléchargement. Une transformation intelligente. Un PDF de fiches prêt à imprimer — tout simplement.

Regardez notre tutoriel pour apprendre à utiliser CardSnap efficacement

Publicité

Soutenez notre générateur de fiches gratuit en regardant cette publicité.

La publicité aide à garder CardSnap gratuit pour tout le monde

Pourquoi ai-je créé cet outil ?

Découvrez l'histoire derrière CardSnap et notre mission de rendre l'apprentissage accessible.

Un jour, ma fille m'a demandé de l'aider à réviser pour un examen de sciences. Je me suis dit, « Ne serait-ce pas plus facile si elle avait des fiches ? »

Alors j'ai créé ce petit outil pour convertir ses notes en fiches imprimables — rapidement et simplement.

Ça a marché. Et maintenant, je le partage au cas où cela pourrait aider d'autres personnes à mieux étudier.

Rejoignez des milliers d'étudiants et d'enseignants qui font confiance à CardSnap pour leurs besoins d'apprentage

Publicité

Soutenez notre générateur de fiches gratuit en regardant cette publicité.

La publicité aide à garder CardSnap gratuit pour tout le monde