I tried to do upper()
and lower()
and even changing the Y and N's to lowercase inside the code. It works if I put in uppercase Y
and N
but I keep getting errors if I type in lowercase y
or n
. Anyone know a solution?
def patternSum(myDice):
if allSame(myDice):
patternPoints=input("\nWould you like to score the pattern points for all different values (25 points)? [Y/N]: ")
patternPoints.lower()
if patternPoints == "Y":
points = 25
sumDice=input("Would you like to score the sum of the dice (16 points)? [Y/N]: ")
if sumDice == "Y":
points = 25 + 16
if sumDice == "Y":
points = 16
elif patternPoints == "N":
sumDice=input("Would you like to score the sum of the dice (16 points)? [Y/N]: ")
points = 16
else:
print("Please try again by entering Y or N.")
else:
points = sum(myDice)
print( "Your score is now:",patternSum([1,1,1,1,1]),".\n" )
return points
score = score + patternSum(myDice)