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...

  • In python, Write a program to output grades A, B, C, D, F depending on the...

    In python, Write a program to output grades A, B, C, D, F depending on the scores to be lying between 90 and 100, 80 and 89, 70 and 79, 60 and 69 (inclusive of the end points). If the user inputs numbers less than zero or greater than 100, print “Error! Try again!” Thank you

  • In Python In this programming assignment, you will do multiple programming exercises, and eventually develop a...

    In Python In this programming assignment, you will do multiple programming exercises, and eventually develop a Python application that can calculate student course grades. (6 points) Write a program called p2-1.py to: (1) create a list and add integer numbers from 1 to 100 to the list; (2) calculate the average value of all numbers in the list; and (3) print the result (screenshots). (8 points) Write a program called p2-2.py to: (1) allow a user to define how many...

  • 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...

  • Write a program that uses the keys(), values(), and/or items() dict methods to find statistics about...

    Write a program that uses the keys(), values(), and/or items() dict methods to find statistics about the student grades dictionary. Find the following: Print the name and grade percentage of the student with the highest total of points. Also print the grade as per the below grading scale 90 to 100         A 80 to 89           B 70 to 79           C 60 to 69           D Below 60         F Find the average score of each assignment. Use the following data:...

  • 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...

  • Write a program that will calculate your letter grade at the end of the semester for...

    Write a program that will calculate your letter grade at the end of the semester for CSIS130. Your program will read an input file that shall contain all the tests scores and lab scores for the semester, and the input file data should be in the following format: full name of student Test1 Score (0…100), Test2 Score (0..100) , Final Exam Score (0..100), Total Number of Labs: N NLab Scores (0=Fail, 1=Pass) [You will have N lab scores each separated...

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