TORONTO KIDS COMPUTER CLUB | Aurora Monday 18:30 Homework
119
archive,category,category-aurora-monday-1830-homework,category-119,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Aurora Monday 18:30 Homework

24 Apr Aurora Monday 18:30 Python Homework 22.04.18.

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