### Rolling a Six-Sided Die 6,000Times
"""  TEST 1
Face    Frequency
   1          980
   2         1018
   3          991
   4          968
   5         1005
   6         1038
 
""" 
""" TEST 2
Face    Frequency
   1         1028
   2          941
   3         1060
   4          998
   5         1011
   6          962
"""

# 9/15/21 JG Simplyfying  fig04_01.py
"""Roll a six-sided die 6000 times."""
import random
frequency = []

# 9/15/21 JG INS 2L: face frequency counters initialize to 0
for i in range(7):
   frequency.append(0)


# 9/15/21 JG INS 6L: 6000 die rolls and calculate face frequency
for roll in range(6000):  # note underscore separators
    face = random.randrange(1, 7)

   # 9/15/21 JG INS 3L:increment appropriate face counter
    for i in range(1, 7):
        if face == i:
            frequency[i] += 1

# 9/15/21 JG INS 3L display output with a header
print(f'Face{"Frequency":>13}')
for i in range(1, 7):
        print(f'{i:>4}{frequency[i]:>13}')
              
              
