Question

[Using Python] Use the grade scale in the syllabus for this class, write a program that...

[Using Python] Use the grade scale in the syllabus for this class, write a program that inputs a score, and prints the grade for that score. For example, if I input 90.0, your program should print A.

Grading Scale is:

100% - 90% A

89% - 80% B

79% - 70% C

69% - 60% D

59% - 0% E

0 0
Add a comment Improve this question Transcribed image text
Answer #1

# taking user input
score = float(input("Enter a grade: "))

# printing grade according to score
if score <= 90:
print("A")
elif score <= 80:
print("B")
elif score <= 70:
print("C")
elif score <= 60:
print("D")
else:
print("E")
  
  

# Please up vote. Happy Learning!

Add a comment
Know the answer?
Add Answer to:
[Using Python] Use the grade scale in the syllabus for this class, write a program that...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Solve This Problem using python and please comment on every line. also, use function to solve...

    Solve This Problem using python and please comment on every line. also, use function to solve this. thanks The result will be like as below: Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following functions in the program: This function should accept five test scores as arguments and return the average of the scores. This function should accept a...

  • PYTHON PART 1) SIMPLE IF STATEMENTS INSIDE A LOOP. The first part of your program should...

    PYTHON PART 1) SIMPLE IF STATEMENTS INSIDE A LOOP. The first part of your program should do the following: • Write a section of code that prints off the numbers from 50 to 100. • It should also print off the letter grade that goes with that number on the same line using an if statement o 0 – 59 = F o 60 – 69 = D o 70 – 79 = C o 80 – 89 = B...

  • 1. Create a program that takes a numerical score and outputs a letter grade. 2. In...

    1. Create a program that takes a numerical score and outputs a letter grade. 2. In this program, create two void functions titled makeScore and theGrade with an int argument. 3. The function makeScore should have a Reference parameter and theGrade should have a Value parameter. Note: Specific numerical scores and letter grades are listed below: 90-100 = Grade A 80-89 = Grade B 70-79 = Grade C 60-69 = Grade D 0-59 = Grade F 4. The function makeScore...

  • Write a program that asks the user to enter five test scores. The program should display...

    Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Design the following functions in the program: calcAverage—This function should accept five test scores as arguments and return the average of the scores. determineGrade—This function should accept a test score as an argument and return a letter grade for the score (as a String), based on the following grading scale: Score Letter Grade...

  • C++ 1. Write a program to check if two values are equal. The output should give...

    C++ 1. Write a program to check if two values are equal. The output should give the response "Both a and b are the same" or "a and b are not the same". 2. Write a program to take a test score and determine the grade A is 90-100, B is 80-89, C is 70-79, D is 60-69, F is 60 or below. BONUS - check for input validation (score over 100 or under 0)

  • Question: How do I write a program in C# that calculates a student's final grade for...

    Question: How do I write a program in C# that calculates a student's final grade for a test with 20 multiple questions using arrays and helper methods? Instructions: (0-incorrect answer, 1-correct answer) If the student answered the question right, add 5 points to the running total. If the student didn’t answer correctly subtract .5 points from the running total. The running total is initialized with 5 points (so the student receives 5 points extra credit). To define the final grade...

  • First, create two inputs that can be stored in variables consisting of a student's name. When...

    First, create two inputs that can be stored in variables consisting of a student's name. When the program begins ask "Who is the first student?" followed by "Who is the second student?" You only have to have two students for this program. Ask the user for the scores for the last three test grades for each of the students .   After the user has entered both names, and three scores for each, the program should display the following as output:...

  • This program should be written in C Thoroughly following the Code Conventions, write an efficient program,...

    This program should be written in C Thoroughly following the Code Conventions, write an efficient program, which ask the user for their numeric grade, and determines and displays the equivalent letter grade, based on the following information: Use appropriate data types and initialize the variables correctly Use the following grading scale: A: 90 - 100 B: 80 - < 90 C: 70 - < 80 D: 60 - < 70 F: 0 - < 60 If the input is invalid,...

  • Write python code on computer, No handwritten code You will implement a program which asks the...

    Write python code on computer, No handwritten code You will implement a program which asks the user to enter scores of different courses in different semesters. The program should read the input and output some simple statistics 1. An example input string by the user is given below. Fal12016-coursel:82, course2:80,course3:85;Spring2018- course4:82;Fall2018-course5:85, course6:50, course7:78 Info from different semesters are separated by a ";", courses in each semester are separated by a,and score and corresponding course is separated by a, information of...

  • Write a C++ program that asks the user for an exam score. The program displays on...

    Write a C++ program that asks the user for an exam score. The program displays on the screen the appropriate later grade as per the schema below: a. A: [90-100] b. B: [80:89] c. C: [70:79] d. D: [60:69] e. F: otherwise

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT