my first program
This commit is contained in:
parent
91d498fd6c
commit
18e3034ddd
1 changed files with 4 additions and 3 deletions
7
hello.py
7
hello.py
|
|
@ -4,11 +4,12 @@
|
|||
|
||||
print("Hello!")
|
||||
|
||||
name = input("What is your name? ")
|
||||
print("Nice to meet you, " + name)
|
||||
name = input("Whats ur name ")
|
||||
print("Nice to meet you, Ty'kyvion " + 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 15", age + 1)
|
||||
answer = int(input("what is 2=3-x whats x? "))
|
||||
Loading…
Add table
Add a link
Reference in a new issue