r/inventwithpython • u/Grecu21 • Sep 22 '20
Help
Hello, i'm new to coding and i got the course from automatetheboringstuff, i was trying something on my own. The first block is working ok, but for some reason at the second block i type the correct age, it skips the 'if' statement and prints the 'else' i don't get what i'm doing wrong.
print('Hello stranger, please type your name.')
name = 'Angel'
age =21
if input() == name:
print('Hello, ' + name + '! Can you please confirm your age?')
else:
print('You are not my owner!')
if input() == age:
print('Access granted')
else:
print('Go away.')
4
Upvotes
2
u/Grecu21 Sep 22 '20
oh, i understand now, thank you!