Related questions
USE PYTHON PLEASE (give the same output as the instruction given)
Program Specifications Write a program to calculate a course grade given points for homework, quizzes, practice question, and Survey. Grades are calculated differently for undergrads, grads and distance learners.
Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.
Step 1 Read from input student status (str). If input is not one of "UG" (undergrad), "G" (grad), or "DL" (distance learner), print an error message and exit the program. Otherwise read from input floats for homework points, quiz points, Practice score, and Survey score. Calculate each category's average using maximum points for homework (800), quizzes (400), Practice question (150), and Survey (200). Output category averages as a percentage using print(f"Homework: {homework:2.1f}%"). Submit for grading to confirm two tests pass.
Ex: If the input is:
UG 600.0 300.0 120.0 185.0
The output is:
Homework: 75.0% Quizzes: 75.0% Practice question: 80.0% Survey: 92.5%
Ex: If the input is:
TL 600 300 120 180
The output is:
Error: student status must be UG, G or DL
Step 2 Set any average to 100% if average is above 100%. Submit for grading to confirm three tests pass.
Ex: If the input is:
UG 700.0 300.0 200.0 205.0
The output is:
Homework: 87.5% Quizzes: 75.0% Practice question: 100.00% Survey: 100.0%
Step 3 Calculate the course average based on student status using the table below. Output the course average. Submit for grading to confirm five tests pass.
| Category | UG | G | DL |
|---|---|---|---|
| Homework | 20% | 15% | 5% |
| Quizzes | 20% | 5% | 5% |
| Practice question | 30% | 35% | 40% |
| Survey | 30% | 45% | 50% |
Ex: If the input is:
G 800.0 400.0 100.0 100.0
The output is:
Homework: 100.0% Quizzes: 100.0% Practice question: 66.7% Survey: 50.0% G average: 65.8%
Step 4 . Identify the course letter grade based on the course average using the table below. Output the course letter grade. Submit for grading to confirm all tests pass.
| Average | Grade |
|---|---|
| at least 90.0 | A |
| at least 80.0 and less than 90.0 | B |
| at least 70.0 and less than 80.0 | C |
| at least 60.0 and less than 70.0 | D |
| less than 60.0 | F |
Ex: If the input is:
DL 600.0 300.0 120.0 150.0
The output is:
Homework: 75.0% Quizzes: 75.0% Practice question: 80.0% Survey: 75.0% DL average: 77.0% Course grade: C
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images
- Computer Science 1st year Computer Science Abdulmuttalib T. Rashid Sheet No. 2 Q1: - Design a form and write a code to find the average value of N degrees using For Next Loop. Use InputBox function to read degrees. Q2: - Design a form and write a code to find the largest value of N numbers using Do While Loop. Use InputBox function to read numbers. Q3: - Write VB program using Do Loop While to read 7 marks, if pass in all marks (>=50) print "pass" otherwise print "fail". Use input box to read marks. Q4: - Write VB program using Do Until Loop to find the summation of student's marks, and it's average, assume the student have 8 marks. Use InputBox function to read marks. Q5: - Write VB program to read the degrees of computer science material, and find how many students are success, and how many students are failed. Use Do While Loop. Q6: - Write VB program to calculate the following equation. Use inbut box to read values of x and msgbox function to display the result values of y(x)....arrow_forwardQuèstion 25 By default the compiler is always responsible to set the step-size for a loop variable in a counting iterative statement. True Falsearrow_forwardDescriptive form Symbolic form Español ロ~ロ ロヘロ ロvロ (a) Ivan is not wearing sandals or it is not spring. ロ→ロ (b) It is false that "Ivan is wearing sandals or it is spring". (c) (Choose one) - p^qarrow_forward
- Inputs of mortgage calculator that determines a monthly payment for loans and produces an amortization schedule for the life of the loan(10-15-20) years fixed loan with 4.5% interest rate and Principal 100000$. The program should initially prompt the user for 1) the principal of the loan. 2)It should then ask him or her to enter an annual interest rate for the loan. 3)The final input should be the number of years that the loan will be outstanding. Because the company only offers three different terms (10-, 15-, and 30-year loans), the program should ensure that no other terms are entered. P = 100,000ドルr = 4.50% per year / 12 months = 0.375% (or 0.00375) per periodn = 15 years * 12 months = 180 total periods A = 100,000 * (.00375 * (1 + .00375)180)/((1+.00375)180 – 1) Using these numbers in the formula above yields a monthly payment of 764ドル.99. Amortization schedule: The Interest portion of the payment is calculated as the rate (r) times the previous balance and should be rounded to the...arrow_forwardAssignment, Work, Error code: please add or fix any errors if needed for this assignement. I'm having troubles after running Gccarrow_forwardModule/Week 2 ASSIGNMENT (INPUT/OUTPUT)The number of permutations of a set of n items taken r at a time is given by the following formulan !⁄r !(n-r)!: where n! is the factorial of n, r! is the factorial of r, and (n-r)! is the factorial of the result of n-r. The factorial of a number n can be solved using the following formula: 〖n!=e〗^(-n) n^n√2πn. If there are 18 people in your class and you want to divide the class into programming teams of 3 members, you can compute the number of different teams that can be arranged using this formula (n !⁄r !(n-r)!). Write a C++ program that determines the number of potential team arrangements. You will need to use the double type for this computation. Use the Lab Template you set-up last week, proper formatting, and appropriate comments in your code. The output must be labeled clearly and formatted neatly. Submit C++ Programming Assignment 2 by 11:59 p.m. (ET) on Monday of Module/Week 2.arrow_forward
- Assignment-5 Create flow chart and algorithm for following problem: Check whether the inputted number is a. Positive b. Negative C. zeroarrow_forwardAlgorithms and data examples to be written: Problem 1: (Hint: Use a sequential structure) How do you calculate the miles you are getting per gallon of gasoline if you record the mileage readings from your car's odometer each time you fill up the gas tank? Two odometer readings should be inputted, one reading is before you fill up the gas tank, and the second reading is when you refill the gas tank. The third input is the quantity of gallons of gasoline purchased when the gas tank is refilled. After inputting these 3 values, calculate and output: The miles traveled between gas refills The average miles per gallon based on the miles traveled and the amount of gasoline purchased after the time the gas tank is refilled a. b. Algorithm: Data Example: Problem 2: (Hint: Use a sequential structure) How do you calculate the price you would pay for an item if it is on sale and you have an additional discount coupon? To calculate the final price paid, 3 inputs are needed: the original price of...arrow_forwardProblem Statement The barcode used by the U.S. Postal System to route mail is defined as follows: Each decimal digit in the ZIP code is encoded using a sequence of three half-height and two full-height bars. The barcode starts and ends with a full-height bar (the guard rail) and includes a checksum digit (after the five-digit ZIP code or ZIP + 4), computed by summing up the original digits modulo 10. Define the following functions: Draw a half-height or full-height bar on stddraw. Given a digit, draw its sequence of bars. Compute the checksum digit. Also define global code that read in a five- (or nine-) digit ZIP code as the command-line argument and draws the corresponding postal barcode.arrow_forward
- PYTHON QUESTION ASSIGNMENT REQUIREMENTS This assignment requires a dictionary of state abbreviations and their capital cities. The abbreviations are the keys and the state capitals are the values. Start by entering data for any four states of your choice. Then, report this count but use a function to get the count. Use a while loop to add more abbreviations and capitals. The loop should continue until the user presses Enter when prompted for an abbreviation. Inside the while loop: If the state entered is already in the dictionary, report its capital. If it is not in the dictionary, prompt the user to enter the capital for that state and add it to the dictionary After the while loop ends: Report again the count of the number of states in the dictionary. Using another loop and the items() method, display all the state abbreviations and their capitals. In the same Python program write this code, although it has nothing to do with the states code. Using a dictionary...arrow_forwardPython code please help, indentation would be greatly appreciatedarrow_forwardNeed help PYTHON PROGRAMMING ONLY PLEASE NUMBER 12arrow_forward
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education