Write a program that will ask a user to input grades in Integral Calculus, Computer Programming and Physics. A grade of greater than or equal to 70 means PASSED and a grade of below 70 means FAILED. If the user has a rating of PASSED from all three subjects, the program must return a status of REGULAR. If the user has only one FAILED rating, the program must return a status of PROBATIONARY and if the user has two or more FAILED rating, the program must return a status of DISMISSED. Assume that the user will only input numerical values for their grades. 1. Type the following code on your Python script. 1 integral_calc = float(input('Input your grade in Integral Calculus: "')) 2 phys=float(input('Input your grade in Physics: ')) 3 comp_prog=float(input('Input your grade in Computer Programming: ')) 4 if (integral_calc >= 70 and phys >= 70 and comp_prog >= 70): 5 print('Congratulations, you are REGULAR!") 6 elif((integral_calc < 70 and phys < 70) or (integral_calc < 70 and comp_prog < 70) or (comp_prog < 70 and phys < 70)): 7 print('Sorry, you are DISMISSED') 8 else: 9 print('You are PROBATIONARY!") 2. Run the program and test different input grades for the three subjects. Make sure to use only acceptable inputs since we didn't put a try/except block to our program. 3. Explain how logical operators are used in lines 4 and 6 to avoid using chained and nested conditionals. 4. Why does the instance of three FAILED marks (Integral Calculus, Computer Programming and Physics all less than 70) not included in writing the code for the program?

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

PYTHON PROGRAMMING

Write a program that will ask a user to input grades in Integral Calculus, Computer
Programming and Physics. A grade of greater than or equal to 70 means PASSED and a
grade of below 70 means FAILED. If the user has a rating of PASSED from all three
subjects, the program must return a status of REGULAR. If the user has only one FAILED
rating, the program must return a status of PROBATIONARY and if the user has two or
more FAILED rating, the program must return a status of DISMISSED. Assume that the
user will only input numerical values for their grades.
1. Type the following code on your Python script.
1 integral_calc = float(input('Input your grade in Integral Calculus: '))
2 phys=float(input('Input your grade in Physics: '))
3 comp_prog=float(input('Input your grade in Computer Programming: '))
4
if (integral_calc >= 70 and phys >= 70 and comp_prog >= 70):
5
print('Congratulations, you are REGULAR!")
6
elif((integral_calc < 70 and phys < 70) or (integral_calc<70 and comp_prog < 70) or
(comp_prog < 70 and phys<70)):
7
print('Sorry, you are DISMISSED')
8
else:
9
print('You are PROBATIONARY!")
2. Run the program and test different input grades for the three subjects. Make sure to
use only acceptable inputs since we didn't put a try/except block to our program.
3. Explain how logical operators are used in lines 4 and 6 to avoid using chained and
nested conditionals.
4. Why does the instance of three FAILED marks (Integral Calculus, Computer
Programming and Physics all less than 70) not included in writing the code for the
program?
Transcribed Image Text:Write a program that will ask a user to input grades in Integral Calculus, Computer Programming and Physics. A grade of greater than or equal to 70 means PASSED and a grade of below 70 means FAILED. If the user has a rating of PASSED from all three subjects, the program must return a status of REGULAR. If the user has only one FAILED rating, the program must return a status of PROBATIONARY and if the user has two or more FAILED rating, the program must return a status of DISMISSED. Assume that the user will only input numerical values for their grades. 1. Type the following code on your Python script. 1 integral_calc = float(input('Input your grade in Integral Calculus: ')) 2 phys=float(input('Input your grade in Physics: ')) 3 comp_prog=float(input('Input your grade in Computer Programming: ')) 4 if (integral_calc >= 70 and phys >= 70 and comp_prog >= 70): 5 print('Congratulations, you are REGULAR!") 6 elif((integral_calc < 70 and phys < 70) or (integral_calc<70 and comp_prog < 70) or (comp_prog < 70 and phys<70)): 7 print('Sorry, you are DISMISSED') 8 else: 9 print('You are PROBATIONARY!") 2. Run the program and test different input grades for the three subjects. Make sure to use only acceptable inputs since we didn't put a try/except block to our program. 3. Explain how logical operators are used in lines 4 and 6 to avoid using chained and nested conditionals. 4. Why does the instance of three FAILED marks (Integral Calculus, Computer Programming and Physics all less than 70) not included in writing the code for the program?
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Random Class and its operations
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