Need help with the Cho-Ho challenge in python

So I’m trying to do the Cho-Ho project but I’m stuck and confused. Which is roll 2 dice and add them together and the user guesses if its odd or even. Can someone help me out I’m lost. so I dont know how to check the guess of the user. guess being either even or odd
def choho(guess, bet):

This is typically determined by testing if a number is evenly divisible by 2.

1 Like

Yeah I know how to do that but the string part is throwing me off. when they type the word ‘Even’

You need to test

if roll is even and guess is "even"
if roll is odd and guess is "even"
if roll is even and guess is "odd"
if roll is odd and guess is "odd"

… and do something in each case. There are many ways to put it together.

1 Like

chohan(Even, 50)
NameError: name ‘Even’ is not defined
when running the program and the user trys to guess 'Even or ‘Odd’ thats what I get.
I didnt think I needed a new variable for that

Then perhaps you ought to be passing a "string" rather than a variable?

This is just a guess based off the limited info you’ve provided. We’d likely be more help if we could see your entire code.

1 Like

Did you do the coin flip? How did you do “heads” or “tails”?