Here's a nice simple task to get students to practice flowcharts AND simple loops using While! This is a nice task to look at the Fibonacci Sequence which is a series of numbers that follows a certain algorithm (you can get the students to look at the progression and try to work out themselves how it works!):The sequence is:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ... The next number is found by adding up the two numbers before it. The 2 is found by adding the two numbers before it (1+1) Similarly, the 3 is found by adding the two numbers before it (1+2), And the 5 is (2+3), and so on! Here is a longer list: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, ... TasksThe first challenge for students is for them to take the task and write it out as a flowchart (shown to the right) The second task is write the code in python to print out the first 100 numbers in the sequence. Extension task: modify the code so that the program asks how many numbers in the sequence the user would like to see outputted The code to achieve the basic task is show below: |

fib.py |