Ask coding questions

← Back to all posts
help me with problem please
Saoxddd (0)

I need a solution to fix the dice being rolled multiple time, please help

ThatSmart (43)

I see a few problems. One, roll will always be equal to yes because it is a variable set to "yes". Two, you're using a while loop, which will repeat as long as that's true. If you want it to keep asking to roll, I'd remove roll = "yes" and answer = "no" and put roll = input("Roll the Dice??") while roll == "yes" or roll == "y":, or replace while with if if you want to only roll once. The code is at