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: Read in a numeric grade from a student Convert the numeric grade to a letter grade using the grade policies in your syllabus. Keep a running total of the numeric grades entered. Keep a count of the number of grades entered. 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!” 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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education