Dice Roll
Write a program that will simulate rolling a six-sided die.
You rolled a 2
import random assign roll to a random integer between 1 and 6 (inclusive) print "You rolled a " & roll
import random
roll = random.randint(1, 6)
print("You rolled a", roll)
# Required to use random
import random
# Generate a random number between 1 and 6 and set it to roll
roll = random.randint(1, 6)
# Display the output to the user
print("You rolled a", roll)
Extension
Rewrite the program to use two seperate dice. The roll of each dice should be output to the user, and the combined total should also be displayed.
You rolled a 2 and a 6 The total is 8