#Fix Me!!
Your task is to open the code called dice and fix the errors, it should:
- Roll the dice and store the value
- Output the number on the dice using the text strings
- the program should be able to roll the dice or print the dice value independantly of each other.
The code is shown below:
#Coin flip program
#Describe the purpose of this program here.
inport random;time
s1 = "- - - - -\n| |\n| O |\n| |\n- - - - -\n"
s2 = "- - - - -\n| O |\n| |\n| O |\n- - - - -\n"
s3 = "- - - - -\n| O |\n| O |\n| O |\n- - - - -\n"
s4 = "- - - - -\n| O O |\n| |\n| O O |\n- - - - -\n"
s5 = "- - - - -\n| O O |\n| O |\n| O O |\n- - - - -\n"
s6 = "- - - - -\n| O O |\n| O O |\n| O O |\n- - - - -\n"
def roll():
Print("rolling....."
roll = rand.randing(7)
def show_dice(roll)
if roll = 1:
print(S1)
else roll = 2
print(s2)
else roll = 3
print(s3)
else roll = 4
print(s4)
else roll = 5
print(s5)
else roll = 6
print(s6)
roll
time.sleep(1)
show_dice(roll)