my first program
This commit is contained in:
parent
81e2e3e838
commit
1732455c89
1 changed files with 5 additions and 1 deletions
6
hello.py
6
hello.py
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
print("Hello!")
|
print("Hello!")
|
||||||
|
|
||||||
name = input("What is your name? ")
|
name =("What is your name? ")
|
||||||
print("Nice to meet you, " + name)
|
print("Nice to meet you, " + name)
|
||||||
|
|
||||||
# int(input(...)) is one thing, not two. input() always hands back text,
|
# int(input(...)) is one thing, not two. input() always hands back text,
|
||||||
|
|
@ -12,3 +12,7 @@ print("Nice to meet you, " + name)
|
||||||
# Wrapping it in int() turns that text into a number.
|
# Wrapping it in int() turns that text into a number.
|
||||||
age = int(input("How old are you? "))
|
age = int(input("How old are you? "))
|
||||||
print("Next year you will be", age + 1)
|
print("Next year you will be", age + 1)
|
||||||
|
color = input("what is your favorite color")
|
||||||
|
print("My favorite color is " + color)
|
||||||
|
food= input("what is your favorite food")
|
||||||
|
print("my favrit food is "+food)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue