<jupyter_start><jupyter_text>Remember the [three girls in a family problem](three_girls)? Now we have variables and functions, we can do a first pass at solving the problem. First we `import` the function we need to make random numbers.  Don't worry about this line for now:<jupyter_code># Fetch the "randint" function from the Numpy library.
from numpy.random import randint<jupyter_output><empty_output><jupyter_text>This function can give us random numbers from 0 up to, but not including 2, like this:<jupyter_code># Generate a random number that is either 0 or 1
randint(0, 2)<jupyter_output><empty_output><jupyter_text>You can run the same cell over and over by pressing Control and Enter together (Control - Enter).  This is like Shift - Enter, except Control - Enter leaves the focus inside the cell, so you can run the same again immediately. We take 1 to mean a girl, and 0 to mean a boy. Now we have variables, we can do better than running this cell four times, and counting the number of time we see 1.<jupyter_code># Get four random numbers between 0 and 1.
a = randint(0, 2)
b = randint(0, 2)
c = randint(0, 2)
d = randint(0, 2)
# Count the number of ones by adding them up.  Show the result.
a + b + c + d<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07034372501998401, 'fraction_numerical': 0.015187849720223821, 'mean_word_length': 4.6909090909090905, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '87196', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 389, 'n_tokens_neox': 370, 'n_words': 192, 'path': 'notebooks/02/first_pass_three_girls.ipynb', 'repo_name': 'matthew-brett/cfd-uob', 'size': '1251'}