Objectives
- Design simple algorithms using repetition
- Create flowcharts that represent algorithms, especially repetition
- Create programs that implement algorithms
For each of the programming projects listed, write a flowchart and a Python program to solve the problem. Turn in the flowchart and source code for each problem. The flowcharts must be neat and professional, drawn with either a flowcharting template or a computer application. The source code listings for these programs, and all others due in this course, must include comments at the beginning of the source code which contain your name, the course, the date, and the assignment number. It is considered cheating to copy work. Problems may be discussed, but not copied.
Both programs must calculate the value that is output at the end. Just printing a hardcoded number in the source code indicates that your program has no real functionality. Make sure that your programs are displaying the value of a variable that has been used to store calculations. If you don't know what that means, then ask.
(20 pts) Write a program that sums up all the multiples of 7 from 0 through 1000 using a loop (of course the last number added up would not be 1000 since 1000 is not a multiple of 7). Example output:
(20 pts) Write a program that keeps reading integers from the user until the number -1 is entered. Then print out the count of the numbers entered and their sum. See the sample input/output below for details. Notice that the message changes after the first number is entered. You are required to use a "priming read" for this program.