I am trying to write a program to generate hailstone sequences for different starting values of n and have achieved this. Now however, I am trying to find the average length of the sequences and what the longest and shortest sequences are in the range(5,1000)and am not sure how to go about this. Have tried a few things but with out much success! Thank you.
La:)
0
Newbie Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
Gribouillis
commented:
great answer
+13
Gribouillis
1,391
Programming Explorer
Team Colleague
abc0502
abc0502
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.