TORONTO KIDS COMPUTER CLUB | admin
1
archive,paged,author,author-admin,author-1,paged-97,author-paged-97,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Author: admin

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