Karteikarten
Ohne Titel
Karten in diesem Stapel (8)
- 1Ask the user to enter a number and store that number in a variablenumber=input("enter a number")
- 2Store the number 26 in a variablenumber=("26")
- 3Multiply 5 by 10 and store the answer in a variablenumber=5*10
- 4Multiply two variable values and store the answer in a variablenumber=2
number2=2
answer=number*number2 - 5Check if the value of one variable is larger than another variable (using an if statement and the > symbol)`age=input("input your age")
if age >16
print("you cant enter") - 6Output text (string) to the userprint("how are you")
- 7Output the value of a variable to the usernumber=input("input a number")
print (number) - 8Output the text AND the value of the variable on one line, by using concatenation (+)name=input("input your name")
print (how are you(name))
Informationen
- Beschreibung
- Karteikarten am Ohne Titel, erstellt von Charley Lee am 02/12/2020.
- Erstellt von
- Charley Lee · Dez 2020
- Aktualisiert
- 2 Dez 2020
- Aufrufe
- 0
- Bewertung