Computer Science, asked by williambarnes, 11 months ago

I am making a small dice game not using java, and this is what I've gotten so far, but it isn't working. what do i do?


import random

sum=0

roll=random.randint(1,6)

rollAgain="A"

while(sum!=50 and rollAgain=="A")

if(sum!=50 and rollAgain=="A")

sum=sum+roll

print(sum)

rollAgain+input("Roll again? A for yes B for no")

roll+random.randint(1,6)

else:

print(Buster


Abhiraj1928: Which language are you using then?
williambarnes: english??

Answers

Answered by Abhiraj1928
1

The problem is the first line, instead of import random, use "import randint"

And use "var" at starting of 3rd and 4th line

Use "int" at starting of 2 line

Now try it

Hope this help ik there should be more mistakes, but I can find out this much only, maybe anyone else can find other


williambarnes: ahh, well thanks! ill try it out
williambarnes: now, is it exactly var, or is it variable
Abhiraj1928: var, becuase variable is used as var
Similar questions