Search This Blog

Thursday, April 7, 2022

dice rolling

 import random

while True:
print(''' 1. roll the dice 2. exit ''')
user = int(input("what you want to do\n"))
if user==1:
number = random.randint(1,6)
print(number)
else:
break

No comments:

Technical Training

Week1 (09-07-202 6) Number-Based Problems 1. Spy Number: check if the sum of digits equals the product of digits for a given number. Print a...