my first program
This commit is contained in:
parent
0a05180747
commit
6c2871e27a
1 changed files with 3 additions and 3 deletions
6
hello.py
6
hello.py
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
print("Hello!")
|
||||
|
||||
name = input("What is your name? ")
|
||||
print("Nice to meet you, " + name)
|
||||
name = input("What is your name? marion ")
|
||||
print("Nice to meet you,marion " + name)
|
||||
|
||||
# int(input(...)) is one thing, not two. input() always hands back text,
|
||||
# even when someone types a number, and you cannot do maths with text.
|
||||
# Wrapping it in int() turns that text into a number.
|
||||
age = int(input("How old are you? "))
|
||||
print("Next year you will be", age + 1)
|
||||
print("Next year you will be 13", age + 1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue