<jupyter_start><jupyter_text>1.How many seconds are in an hour? Use the interactive interpreter as a calculator and multiply the number of seconds in a minute (60) by the number of minutes in an hour (also 60).<jupyter_code>60 * 60<jupyter_output><empty_output><jupyter_text>2. Assign the result from the previous task (seconds in an hour) to a variable called seconds_per_hour.<jupyter_code>seconds_per_hour = 60 * 60
seconds_per_hour<jupyter_output><empty_output><jupyter_text>3. How many seconds do you think there are in a day? Make use of the variables seconds per hour and minutes per hour.<jupyter_code>24 * seconds_per_hour<jupyter_output><empty_output><jupyter_text>4. Calculate seconds per day again, but this time save the result in a variable called seconds_per_day<jupyter_code>seconds_per_day = 24 * seconds_per_hour
seconds_per_day<jupyter_output><empty_output><jupyter_text>5. Divide seconds_per_day by seconds_per_hour. Use floating-point (/) division.<jupyter_code>seconds_per_day / seconds_per_hour<jupyter_output><empty_output><jupyter_text>6. Divide seconds_per_day by seconds_per_hour, using integer (//) division. Did this number agree with the floating-point value from the previous question, aside from the final .0?Yes this number agree with the floating-point value from the previous question, aside from the final .0<jupyter_code>seconds_per_day // seconds_per_hour<jupyter_output><empty_output><jupyter_text>7. Write a generator, genPrimes, that returns the sequence of prime numbers on successive calls to its next() method: 2, 3, 5, 7, 11, ...<jupyter_code>def genPrimes():
    primes = [2]
    yield primes[0]
    guess = 3
    while True:
        if all(guess%x != 0 for x in primes):
            primes.append(guess)        
        if guess == primes[-1]:
            yield primes[-1]
        guess += 2
        
x = genPrimes()
print(x.__next__())
print(x.__next__())
print(x.__next__())<jupyter_output>2
3
5
{'fraction_non_alphanumeric': 0.08436213991769548, 'fraction_numerical': 0.02109053497942387, 'mean_word_length': 4.876132930513595, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, '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': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '235153', 'license': 'MIT', 'n_tokens_mistral': 648, 'n_tokens_neox': 618, 'n_words': 201, 'path': 'assignments/PythonBasics/Assignment_15.ipynb', 'repo_name': 'sanneabhilash/ineuron_datasciencemasters', 'size': '1944'}