repl.it
@DARKLORD6474/

dice game top schools

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
while True:
  from  random import randint
  import time
  die1 = randint(1,6)
  die2 = randint(1,6)
  score1 = die1+die2
  score2 = 0
  print('Die 1 is',die1)
  time.sleep(2)
  print('Die 2 is',die2)
  if die1 == die2:
    time.sleep(2)
    print('Your score is',score2)
  else:
    print('Your score is',score1)
  restartprog = input('Do u want to play again?(yes/no)')
  if restartprog == 'no':
    print('Shutting Down')
    break
  else:
    print('restarting')
?