Logo

Programming - PYTHON 1

Bereit für mehr? Entdecke ähnliche Karteikarten-Sets in diesem Bereich und verwandte Themen.

60 Fragen
May 27, 2025

Frage 1

How do you create a new file in Python IDLE?

Antwort

Click on file, then new file.

Frage 2

What happens if you type below the three arrows?

Antwort

Your document will get lost.

Frage 3

What does the print function do?

Antwort

It prints something for the user to read.

Frage 4

How do you display 'Hello World' using print?

Antwort

Use print('Hello World').

Frage 5

What does Python's case sensitivity imply?

Antwort

You must type things exactly as written.

Frage 6

What does 'unexpected indent' mean?

Antwort

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

Frage 7

How can you fix the indentation error?

Antwort

Backspace your code to align it with the left margin.

Frage 8

What does EOF unexpected error indicate?

Antwort

It indicates a missing bracket.

Frage 9

What does EOL while scanning string literal mean?

Antwort

There is a missing quotation mark.

Frage 10

How do you create a new line in print?

Antwort

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

Frage 11

How do you create a tab space in print?

Antwort

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

Frage 12

What is the purpose of the input function?

Antwort

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

Frage 13

What is a variable in Python?

Antwort

A space in memory used to store data.

Frage 14

How do you create a variable?

Antwort

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

Frage 15

What is the function to print user input?

Antwort

Use print(userinput).

Frage 16

What must be the first character of a variable?

Antwort

It must start with a letter.

Frage 17

Can variable names have spaces?

Antwort

No, spaces will cause an error.

Frage 18

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

Antwort

You can use underscores (_).

Frage 19

What are the main data types in Python?

Antwort

String, Integer, Float, and Boolean.

Frage 20

How are strings defined?

Antwort

Strings are enclosed in quotes.

Frage 21

What type of number is 3?

Antwort

It is an integer.

Frage 22

What is a float?

Antwort

A number with a decimal place.

Frage 23

What does Boolean represent?

Antwort

A true or false value.

Frage 24

How can you identify a string versus an integer?

Antwort

Strings are in quotes; integers are not.

Frage 25

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

Antwort

You cannot perform math operations on a string.

Frage 26

What does input automatically convert?

Antwort

Input converts values into strings.

Frage 27

What is casting in Python?

Antwort

It's converting one data type to another.

Frage 28

How do you convert a string to an integer?

Antwort

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

Frage 29

What does a hashtag before code indicate?

Antwort

It designates a comment which is ignored by Python.

Frage 30

What can comments serve as?

Antwort

They can act as reminders or hide code.

Frage 31

How do you print mixed variables?

Antwort

Combine variables and strings using the print function.

Frage 32

What is sequential programming?

Antwort

It's when code runs in a specific order.

Frage 33

What does concatenation do?

Antwort

It adds strings together.

Frage 34

How do you concatenate strings in Python?

Antwort

Use the + operator.

Frage 35

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

Antwort

It will print JuliaRoebuck without a space.

Frage 36

How can you add a space between concatenated strings?

Antwort

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

Frage 37

Is 'userinput' a valid variable name?

Antwort

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

Frage 38

What is the correct way to use input for age?

Antwort

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

Frage 39

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

Antwort

It displays the user's age in a sentence.

Frage 40

What should you remember about variable names?

Antwort

They must be consistent in case sensitivity.

Frage 41

How does Python identify reserved keywords?

Antwort

They automatically turn purple in the editor.

Frage 42

What does a missing closing bracket lead to?

Antwort

An EOF unexpected error.

Frage 43

What type is '33' in quotes?

Antwort

It's a string.

Frage 44

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

Antwort

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

Frage 45

What is the result of mixing variable types?

Antwort

It can combine numbers and text in print statements.

Frage 46

What happens if you miss a quotation mark?

Antwort

An EOL while scanning string literal error occurs.

Frage 47

Are comments run by Python?

Antwort

No, comments are ignored by the interpreter.

Frage 48

How do you indicate an indentation error?

Antwort

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

Frage 49

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

Antwort

Hello World.

Frage 50

Can comments be used for reminders?

Antwort

Yes, they can act as reminders in the code.

Frage 51

Why do we need to backspace code?

Antwort

To correct indentation issues.

Frage 52

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

Antwort

It signifies that 'input' is a reserved keyword.

Frage 53

How do you define a string variable?

Antwort

For example, firstname = 'Julia'.

Frage 54

Can you perform mathematical operations on strings?

Antwort

No, mathematical operations cannot be performed on strings.

Frage 55

How should variable names be structured?

Antwort

They should not contain spaces and be case consistent.

Frage 56

What will result from incorrect indentation?

Antwort

You will encounter indentation errors.

Frage 57

What does Python automatically do with input?

Antwort

It treats all input as strings.

Frage 58

What does print(userinput) do?

Antwort

It outputs whatever the user entered.

Frage 59

Why is it important to close brackets?

Antwort

Every open bracket needs a corresponding closing bracket.

Frage 60

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

Antwort

userinput = input('insert something here').

Etwas nicht in Ordnung?Sagen Sie es uns

Werbung

Unterstütze unseren kostenlosen Karteikarten-Generator, indem du diese Werbung ansiehst.

Werbung hilft dabei, CardSnap für alle kostenlos zu halten

So funktioniert es

Folge diesen einfachen Schritten, um deine personalisierten Karteikarten zu erstellen.

  1. Datei hochladen: Lade eine Datei mit deinen Notizen hoch. Es kann Word, PDF oder TXT sein.
  2. PDF generieren: Wir erstellen ein PDF mit formatierten Karteikarten in der Sprache des hochgeladenen Dokuments. Dieser Vorgang kann je nach Dokumentgröße mehr als 30 Sekunden dauern.
  3. Drucken & Lernen: Beidseitig drucken und ausschneiden. Beginne jederzeit offline zu lernen.

    Online lernen: Sieh dir deine Karteikarten interaktiv in unserer Web-App an und übe sie. Speichere die Seite, um jederzeit zurückzukehren.

Bereit zum Starten? Erstelle jetzt dein erstes Karteikarten-Set!

Werbung

Unterstütze unseren kostenlosen Karteikarten-Generator, indem du diese Werbung ansiehst.

Werbung hilft dabei, CardSnap für alle kostenlos zu halten

Sieh es in Aktion

Einfach hochladen. Eine clevere Umwandlung. Ein druckbares PDF mit Karteikarten — so einfach ist das.

Schau dir unser Tutorial an, um zu lernen, wie du CardSnap effektiv nutzen kannst

Werbung

Unterstütze unseren kostenlosen Karteikarten-Generator, indem du diese Werbung ansiehst.

Werbung hilft dabei, CardSnap für alle kostenlos zu halten

Warum habe ich das gebaut?

Entdecke die Geschichte hinter CardSnap und unsere Mission, Lernen zugänglich zu machen.

Eines Tages bat mich meine Tochter, ihr beim Lernen für eine Wissenschaftsprüfung zu helfen. Ich dachte, „Wäre es nicht einfacher, wenn sie Karteikarten hätte?“

Also habe ich dieses kleine Tool entwickelt, um ihre Notizen schnell und einfach in druckbare Karten umzuwandeln.

Es hat funktioniert. Und jetzt teile ich es, in der Hoffnung, dass es auch anderen beim Lernen hilft.

Schließe dich Tausenden von Schülern und Lehrern an, die CardSnap für ihre Lernbedürfnisse vertrauen

Werbung

Unterstütze unseren kostenlosen Karteikarten-Generator, indem du diese Werbung ansiehst.

Werbung hilft dabei, CardSnap für alle kostenlos zu halten