CS 101: Assignment 3: Loop Exercises
Due: Monday, March 12th by 11:59 PM
Note that late submissions will not be accepted for this assignment.
Your Task
Your task for this assignment is to complete the following CloudCoder exercises. We strongly recommend you do them in order. The later exercises are (in general) more challenging than the earlier ones.
Important: Unlike the other assignments, this assignment is entirely individual. You may not collaborate with or get help from other students. You may ask an instructor or tutor for help.
The exercises:
- Echo input
- Count up
- plus four
- skip counting
- triangle counting
- Count down
- mirror pairs
- Print divisors
- powers of 2
- count evens
- First digit
- Largest digit
- is undulating?
- Perfect Number
- is kth power?
Hints
Don’t print a prompt when reading input values. CloudCoder does not require a prompt, and the text of the prompt is likely to be misinterpreted as the program’s intended output, causing tests to fail.
Since all of the exercises (other than the first) involve loops, you will want to
- Think about a general strategy for solving the problem, and write down an outline of your strategy
- Consider whether a loop recipe is appropriate
- Plan the loop so that you know precisely what needs to happen on each iteration of the loop