3 ms·
The script you included doesn't actually work, as you're comparing a string with an integer. It will always return false.
by Deukhoofd 6y ago
The script you included doesn't actually work, as you're comparing a string with an integer. It will always return false.
- netsharc 6y agoHuh, did the kid understand that 3 != "3"? I'd be stumped how to explain that...
- jcims 6y agoSure give them a cookie and a picture of a cookie.
- shean_massey 6y agoEpic, I like your analogy!
- ThisIsTheWay 6y agoBrilliant
- gregorymichael 6y agoSo good!
- stadt 6y agoThat's the real teachable moment ;P line 9: guess = int(input(question))
- ldeangelis 6y agoI was going to comment the same thing. It can be fixed by addding a conversion in the if like this: if int(guess) == lulu + boonie: instead of if guess == lulu + boonie:
- gregorymichael 6y agoThanks for the catch! Should embed a version a REPL that we're not still working on.