I'm having problems passing crapsRoll() to gameCraps(). When I define gameCraps() I get the error:
Redefining name 'crapsRoll' from outer scope.
And on the print statement I get an error that says
crapsRoll has no value.
import random
#===========================crapsRoll()===============================
def crapsRoll():
roll = random.randint(2,12)
return(roll)
#===========================gameCraps()===============================
def gameCraps(crapsRoll):
crapsRoll = crapsRoll
if (crapsRoll == 7 or crapsRoll == 11):
gameState = 1
elif (crapsRoll == 2 or crapsRoll == 3 or crapsRoll == 12):
gameState = 2
else:
gameState = 3
return(gameState)
print(gameCraps())