dice = random.randint(1,6)
2. rand decimal.py
decimal = random.uniform(0,1)
percent = random.uniform(0,100)
#round percent to 2 decimal places:
rounded = round(percent, 2)
- Generate a random number between 2 and 21.
- write a program that outputs the roles of 2 dice. Challenge: Sum the total of the two dice (so this could be used in monopoly).
- write a program that inputs a whole, positive integer number, then generates a random number between 1 and the number inputted (display this to the screen)
- Write a program that generates 2 random numbers between 1 and 10, and then finds the product of these 2 numbers. Your program should produce output that looks something like this, but with random numbers each time:
Number one: 5
Number two: 7