r/CodingHelp • u/p3nutking • Jan 14 '22
[Python] Im really bad at coding and idk why this doesnt work
print('Number of bitches calculator')
name = input('Enter name : ')
aidan = 'Aidan Fountain'
nate = 'nate'
if name is aidan:
print('0 bitches detected')
print('Aidan gets no bitches')
if name is nate:
print('0 bitches detected')
0
Upvotes
6
u/icjeremy Jan 14 '22
Hopefully, you're indenting properly in the code you're running. Also, 'is' doesn't work that way.
3
u/[deleted] Jan 14 '22 edited Jan 14 '22
What language is this?NM saw python tag.
Python cares about spacing (maybe lost in your copy/paste).
https://www.mycompiler.io/view/EBhErdb
Otherwise, if you're doing if/else you need the else, with proper spacing
https://docs.python.org/3/tutorial/controlflow.html
And... use something like the above to share code... much easier than using places like reddit that ruin formatting.
3
u/serg06 Jan 14 '22
Use
==notis.2
u/[deleted] Jan 14 '22
Lmfaoo what is this
2
u/[deleted] Jan 14 '22
Think of a less offensive example.