Ask coding questions

← Back to all posts
Can anyone help me with this please?
FamousRW (2)

I’ve been trying to test this code after I finished writing it, every time I run the code, after it says Yes or No, When I enter Yes, the code doesn’t continue to run. Can anyone help with it bc I don’t see what I’m doing wrong.

Comments
hotnewtop
RYANTADIPARTHI (6001)

Solution

on line 16, you need to use the parameter instead of the function itself. Try doing this.

def Guessit(begin):
 if begin == "Yes":
   play = True

like that.
That should work

19ecal (229)

I think on line 16 you need if begin=="Yes"

zakdakidd (15)

Never mind, its because you never created a variable called 'play'.

zakdakidd (15)

Im not positive, but it might be that 'Guessit' is not a defined function until after you created it.

zakdakidd (15)

'guessit(begin)' Might have been stated to [email protected]

codingjlu (81)

Why is EVERYONE DOING PYTHON?!

LD1 (53)

@codingjlu Because python is the best

codingjlu (81)

@LD1 But python doesn't even end with semicolons.

LD1 (53)

@codingjlu Making everything easier to read

codingjlu (81)

@LD1 And is based on indentation!!!!!!! That's just soooo messed up.