repl.it
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
import random
sims,wins,losses = 100,0,0

for i in range(sims):
  d1 = random.randint(1,6)
  d2 = random.randint(1,6)
  rollsum = d1 + d2

  if rollsum == 7 :
    print("winner")
    wins += 1
  else:
    print("loser")
    losses += 1

print("wins: ", wins)
print("losses: ", losses)
print("total rolls: ", sims)