Reference no: EM132275423
Focus
1. While loops and For loops
2. Count-controlled loops
3. Sentinel controlled loops
Working program that uses the Repetition Control Structure including the While Loop, the For Loop, and Nested Loops
Part A: Write Something New!
Python program to solve the following problem:
You are the professor for COSC 1305 at St Edwards University. You want to create a program that will take in the numeric grades of the students in your class. Since the students in a class vary from semester to semester, there is no fixed number assigned to the number of students. You will keep track of how many students' grades you input. You will stop taking input when the student enters a grade of -1.
Your program will use loops and will accomplish the following:
1. Read in a numeric grade from a student.
2. Convert the numeric grade to a letter grade using the grade policies in your syllabus.
3. Keep a running total of the numeric grades entered.
4. Keep a count of the number of grades entered.
5. Issue a message that comments on the letter grade earned. As an example, you may write "You made an F! Obviously you did not study!"
6. At the end the program will calculate a class average unless there were no grades entered.
All input to the program will be interactive from the keyboard. The output of the program will include the individual grades converted, the message issued to the student, a class average, and the number of grades entered.
Use the IDLE programming environment if you are using Python with IDLE. Remember to use the extension .py.
Submit your file to Canvas and name the file: Lab6PartB_yourSEUusername turn the text file into Canvas for 'Lab 6'.
Run and test your program for all conditions. Once you are sure it works you will turn in the items listed in the next section.