repl.it
@jdelarios/

CoinFlip1

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
import random

flips = 0
heads = 0
tails = 0
while flips < 100:
    if random.randint(1,2) == 1:
        print("heads")
        heads += 1
    else:
        print("tails")
        tails += 1
    flips += 1

print("you got ", heads," heads, and ", tails," tails!")
input ("exit")