Question
1. Write algorthim/ pseudocode for a program that assigns a letter grade for a n inputted quiz score , according to the following table: 4
Score | Grade |
90-100 | A |
80-89 | B |
70-79 | C |
60-69 | D |
< 60 | F |
The program accepts the score and then displays the Grade for that score.
Test Cases:
20 (should print 2 digits)
-89654 (should print 5 digits)
9000000000 (should print 10 digits)
Test Cases:
1 1 1 (should print all the same)
1 2 3 (should print all are different)
1 1 2 (should print neither)
If hour1 < hour2
time 1 comes first
Else if hour 1 and hour 2 are the same
If minute 1 < minute 2
time 1 comes first.
Else if minute 1 and minute 2 are the same
time 1 and time 2 are the same.
Else
time 2 comes first
Else
time 2 comes first.
Write a program that prompts the user for two points in time (hours and minutes) and prints the time that comes first, then the other time.
Test Cases:
14:12 16:30 (should print Time 1 comes first)
15:35 15:11 (should print Time 2 comes first)
20:23 8:15 (should print Time 2 comes first)
Enter string 1: Charlie
Enter string 2: Able
Enter string 3: Baker
Able
Baker
Charlie
Test Cases:
Able, Baker, Charlie
Baker, Charlie, Able
Charlie, Able, Baker
Able, Charlie, Baker
Baker, Able, Charlie
Charlie, Baker, Able
I want u to program this homework by python
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started