<jupyter_start><jupyter_text>Snail and wellA snail falls at the bottom of a 125 cm well. Each day the snail rises 30 cm. But at night, while sleeping, slides 20 cm because the walls are wet. How many days does it take to escape from the well?TIP: http://puzzles.nigelcoldwell.co.uk/sixtytwo.htm  Solución<jupyter_code># Assign problem data to variables with representative names
# well height, daily advance, night retreat, accumulated distance
import statistics

well_hgh = 125
daily_adv = 30
night_rt = -20
total_adv = 0
accum_dis = daily_adv + night_rt
snail_in = True
# Assign 0 to the variable that represents the solution
days = int(0)
# Write the code that solves the problem
while  snail_in:
        total_adv += accum_dis
        days +=1
        print("Advanced distance=",total_adv,"cm")
        if (total_adv > well_hgh):
            snail_in = False
        else:
            print("Snail has completed:",days,"day(s)")
            
# What is its maximum displacement in a day? And its minimum?
advance_cm = [30, 21, 33, 77, 44, 45, 23, 45, 12, 34, 55]
print ("\nMax displacement in a day=",max(advance_cm),"cm")
print ("\nMin displacement in a day=",min(advance_cm),"cm")

# What is its average progress?
print ("\nAverage progress=",int(sum(advance_cm)/len(advance_cm)),"cm")

# What is the standard deviation of your displacement during the day?
print ("\nStandard Deviaton=",statistics.stdev(advance_cm))<jupyter_output>Advanced distance= 10 cm
Snail has completed: 1 day(s)
Advanced distance= 20 cm
Snail has completed: 2 day(s)
Advanced distance= 30 cm
Snail has completed: 3 day(s)
Advanced distance= 40 cm
Snail has completed: 4 day(s)
Advanced distance= 50 cm
Snail has completed: 5 day(s)
Advanced distance= 60 cm
Snail has completed: 6 day(s)
Advanced distance= 70 cm
Snail has completed: 7 day(s)
Advanced distance= 80 cm
Snail has completed: 8 day(s)
Advanced distance= 90 cm
Snail has completed: 9 day(s)
Advanced distance= 100 cm
Snail has completed: 10 day(s)
Advanced distance= 110 cm
Snail has completed: 11 day(s)
Advanced distance= 120 cm
Snail has completed: 12 day(s)
Advanced distance= 130 cm

Max displacement in a day= 77 cm

Min displacement in a day= 12 cm

Average progress= 38 cm

Standard Deviaton= 17.996969441850734
{'fraction_non_alphanumeric': 0.08716814159292036, 'fraction_numerical': 0.047787610619469026, 'mean_word_length': 4.3451536643026, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '344236', 'license': 'Unlicense', 'n_tokens_mistral': 835, 'n_tokens_neox': 704, 'n_words': 301, 'path': 'snail-and-well.ipynb', 'repo_name': 'evill013/par-apr-2019-prework', 'size': '2260'}