id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

konstans@stuy.edu all > maxHailRange
prev  |  next  |  chance

When looking at all hailstone sequences from low to high, maxHail(low,high) will return the starting number that creates the longest sequence. In the case of a tie, use the lowest starting number. You should look at the hailLen() problem before working on this. You should use your solution from the hailLen() problem. ( http://codingbat.com/author/p264289 ) maxHail(1,17) looks at all the sequences and gives us 9, but we can start looking at 10, by saying: maxHail(10,17) which gives us 14.


maxHailRange(1, 17) → 9
maxHailRange(10, 17) → 14
maxHailRange(1, 8) → 7

...Save, Compile, Run (ctrl-enter)

def maxHailRange(low,high):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy