<commit_before>"""Coin Flip Simulation - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads."""

import random

coin_flip = random.randint(0,1)
nbr_user_flips = int(input("Please enter the number of times you want the coin to flip. >> "))
nbr_flips_total = 0
nbr_tails = 0
nbr_heads = 0

while nbr_flips_total < nbr_user_flips:
    if random.randint(0,1) == 1:
        print("\nThis coin gave tails.")
        nbr_tails += 1
        nbr_flips_total +=1
    elif random.randint(0,1) == 0:
        print("\nThis coin gave heads.")
        nbr_heads += 1
        nbr_flips_total +=1

print("\nThis turn, heads came out",nbr_heads," times and tails came out",nbr_tails," times.")<commit_msg>Added the draft for the graph from links solution.<commit_after>"""Coin Flip Simulation - Write some code that simulates flipping a single coin however many times the user decides. The code should record the outcomes and count the number of tails and heads."""

import random

coin_flip = random.randint(0, 1)
nbr_user_flips = int(
    input("Please enter the number of times you want the coin to flip. >> "))
nbr_flips_total = 0
nbr_tails = 0
nbr_heads = 0

while nbr_flips_total < nbr_user_flips:
    if random.randint(0, 1) == 1:
        print("\nThis coin gave tails.")
        nbr_tails += 1
        nbr_flips_total += 1
    elif random.randint(0, 1) == 0:
        print("\nThis coin gave heads.")
        nbr_heads += 1
        nbr_flips_total += 1

print("\nThis turn, heads came out", nbr_heads,
      " times and tails came out", nbr_tails, " times.")
{'fraction_non_alphanumeric': 0.09801563439567047, 'fraction_numerical': 0.01803968731208659, 'mean_word_length': 3.356020942408377, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5195305', 'n_tokens_mistral': 564, 'n_tokens_neox': 528, 'n_words': 195}