Hi,
Having trouble with code for a coin flip simulation program I’m trying to set up for a Stats class. The goal is to ask how many times to flip the coin, then show the results after the simulation. I’m pretty new to Python and programming, so I checked stack overflow and found the code below to try. Problem is, nothing is printing to the console to review. Any thoughts?
```
import random
def coinToss():
number = input("Number of times to flip coin: ")
recordList = []
heads = 0
tails = 0
for amount in range(number):
flip = random.randint(0,1)
if (flip == 0):
print("Heads")
recordList.append("Heads")
else:
print("Tails")
recordList.append("Tails")
print(str(recordList))
print(str(recordList.count("Heads")) + str(recordList.count("Tails")))
```