TORONTO KIDS COMPUTER CLUB | Blog
1815
paged,page-template,page-template-blog-large-image,page-template-blog-large-image-php,page,page-id-1815,paged-164,page-paged-164,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Blog

15 Mar Friday 17:00 Python Practice 21.03.12.

Question 1:The hailstone sequence starting at a positive integer n is generated by following two simple rules. If n is even, the next number in the sequence is n/2. If n is odd, the next number in the sequence is 3*n+1. Repeating this process, we generate the hailstone sequence. Write a recursive function hailstone(n) which prints the...

Read More