var_1 = random.randint(1,6)
var_2 = random.randint(1,6)
gen_var = var_1 + var_2
my_var = int(input("What do you think the 2 6-sided dice add up to?"))
if my_var != gen_var:
#add your code here
print("You guessed " + str(my_var) + ", the number was " + str(gen_var) + ".")
else:
#add your code here
print("You guessed " + str(my_var) + ", you were correct!")
-
Run Code
-
-
Stop Running Code
-
Show Chart
-
Show Console
-
Codesters How To (opens in a new tab)