For this portion of the lab, you will reuse the program you wrote in Lab 3A. Redesign this solution so that some portions of the code are repeated. In lab 3 you validated input to ensure that the user...


For this portion of the lab,
you will reuse the program you wrote in Lab 3A.  Redesign this solution so that some portions of the code are repeated.  In lab 3 you validated input to ensure that the user entered inputs within certain values.  If the user entered an invalid value, the program terminated.  Now you will add a loop such that the user gets three changes to enter a valid value.  If the user enters an invalid value more than three times in a row, the program should issue an error message and terminate.




  1. Save the program as firstname_lastname_Lab4a.py where you will replace firstname and lastname with your actual first and last name.

  2. Test all conditions prior to submitting. If the user enters an invalid value, then the program will issue an error message and terminate immediately. (Do NOT accept further data).



Part B: Draw Something



In this portion of the lab you will draw an inverted triangle using loops.


**********


*********


********


*******


******


*****


****


***


**


*




Part B: Draw Something New!


Write a complete and syntactically correct Python program to solve the following problem:


 You want to write a program that will take in the number of 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’ grade you input.  You will stop taking input when the student enters a grade of


minus 1 (-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 of the program 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


python

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here