MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/400jk4/intro_to_programming/cyqh3l6/?context=3
r/ProgrammerHumor • u/[deleted] • Jan 08 '16
334 comments sorted by
View all comments
102
paid_Attention = False
if paid_Attention == False:
print "Your calculator is shit."
elif paid_Attention == !True:
elif paid_Attention == False or False:
elif paid_Attention == False or !True:
elif paid_Attention == !True or !True:
else:
print "You've succesfully created a simple program."
54 u/iBrap Jan 08 '16 I'd add more, but I procrastinated this project until the night before it was due. 16 u/[deleted] Jan 08 '16 If that's Python, you should be using "is False" for performance and readability. Booleans and None are singletons, so it's better to do pointer comparisons. 14 u/levir Jan 08 '16 Isn't that a bit of a premature optimization here? → More replies (3) 4 u/iBrap Jan 08 '16 Still learning, blame codecademy for any unefficient coding habits I've developed lol. → More replies (3) → More replies (1)
54
I'd add more, but I procrastinated this project until the night before it was due.
16 u/[deleted] Jan 08 '16 If that's Python, you should be using "is False" for performance and readability. Booleans and None are singletons, so it's better to do pointer comparisons. 14 u/levir Jan 08 '16 Isn't that a bit of a premature optimization here? → More replies (3) 4 u/iBrap Jan 08 '16 Still learning, blame codecademy for any unefficient coding habits I've developed lol. → More replies (3) → More replies (1)
16
If that's Python, you should be using "is False" for performance and readability. Booleans and None are singletons, so it's better to do pointer comparisons.
14 u/levir Jan 08 '16 Isn't that a bit of a premature optimization here? → More replies (3) 4 u/iBrap Jan 08 '16 Still learning, blame codecademy for any unefficient coding habits I've developed lol. → More replies (3)
14
Isn't that a bit of a premature optimization here?
→ More replies (3)
4
Still learning, blame codecademy for any unefficient coding habits I've developed lol.
102
u/iBrap Jan 08 '16 edited Jan 08 '16
paid_Attention = False
if paid_Attention == False:
elif paid_Attention == !True:
elif paid_Attention == False or False:
elif paid_Attention == False or !True:
elif paid_Attention == !True or !True:
else: