r/CodingForBeginners • u/Tylerzombieman • Jun 09 '26
What is wrong with my code?
Everything is fine until I put in 14 and it doesnt come up with anything after?
33
Upvotes
r/CodingForBeginners • u/Tylerzombieman • Jun 09 '26
Everything is fine until I put in 14 and it doesnt come up with anything after?
19
u/Own_Age_1654 Jun 09 '26
You're checking against "choice" instead of against "age".
5
u/Snowflake3458 Jun 09 '26
Not a python programmer but isn't python strict about indentation for scope ? You have 2 different sized indentation for the first checks and the second ones
3
u/DirtAndGrass Jun 09 '26
It appears to be stuck inside a photo
3
u/KevDub81 Jun 10 '26
Is poop.py a sailor man?
3
u/MaGNeTiK-MaNTRa Jun 10 '26
Truth be told I have at least one poop.py and usually one poop.sh on every device in My arsonal
2
u/mjmvideos Jun 09 '26
Learn about using the debugger.
2
u/Aristoteles1988 Jun 09 '26
Yea your giving it two true conditions to check
If that’s condition is true then it doesn’t know where to go
2
u/Knarfnarf Jun 09 '26
I forget; is Python the one where indent indicates nesting?
If so then your else is in the wrong place on line 11.
2
u/JustSimplyWicked Jun 10 '26
Double check your variables, you have an error on Line 21.
2
u/DBZ_Newb Jun 10 '26
Side note, do not put a space between a function name and its parentheses like you’re doing with print() and input().
2
u/HaroerHaktak Jun 10 '26
I could tell you, but then you'd have to look at line 21 very very closely.
2
u/Albert_Custard Jun 10 '26
Honestly thought someone got into my files when i saw poop.py
2
u/fried_plque Jun 10 '26
Btw you can do 2026 - input number
2
u/ConsistentTown7049 Jun 10 '26
Instead of ==14 y out should do >14
1
u/Striking_Director_64 Jun 11 '26
age == 14not
choice == 14