Day 3, for documentation purposes . . . I now have so many questions swimming around in my head related to how & when I would use programming in the future. But that's another post.
For Day 3, students were introduced to loops. This was a little more difficult for all of us, but the students were still super interested in the process.
Chris gave us these programs to try:
1. Use a loop to write a program that prints all multiples of three from 3-42.
2. Primality testing: Write a program that lets the user input a number and then checks if it is prime.
3. Number of numbers divisible by 3: Write a program that will let the user input a number, and then the program searches for and counts the number of numbers up to that number that are divisible by 3.
4. Product of first n numbers: Write a program that will let the user input a number, and then it will find the value of the product of all the integers up to that number.
5. Averaging test scores: Write a program that asks the user how many test scores they want to average, and then prompts them for each test score and finds the average.
Harder ones:
6. Reducing Radicals: Write a program that can reduce a radical. For example, if the user enters 20, it should return the numbers 2 and 5, representing 2 root 5.
7. Finding perfect numbers: A perfect number is a number that is equal to the sum of its divisors, besides itself. Example: 6 = 1 + 2 + 3. The first 4 perfect numbers were known in antiquity. Write a program that can find all perfect numbers up to a number inputted by the user. You will most likely need nested loops.
These were tough! I did not get through the list of programs today (or past #3).
The activity is still a hit with students. They are seriously begging for more!
Tomorrow they are each going to present one of their original programs.