Karteikarten
Ohne Titel
Karten in diesem Stapel (8)
- 1Ask the user to enter a number and store that number in a variablenumVariable = input("Input a number")
- 2Store the number 26 in a variablenum26 = 26
- 3Multiply 5 by 10 and store the answer in a variablenum50 = 5 * 10
- 4Multiply two variable values and store the answer in a variablenum26 * num50 = newNum
- 5Check if the value of one variable is larger than another variable (using an if statement and the > symbol)if num50 > num26 then
- 6Output text (string) to the userprint("Hello world")
- 7Output the value of a variable to the userprint(newNum)
- 8Output the text AND the value of the variable on one line, by using concatenation (+)print("Your new number is " + str(newNum))
Informationen
- Beschreibung
- Karteikarten am Ohne Titel, erstellt von Kyle Dewfall am 25/11/2020.
- Erstellt von
- Kyle Dewfall · Nov 2020
- Aktualisiert
- 25 Nov 2020
- Aufrufe
- 15
- Bewertung