Question

Create a program in Python to change Grades in number and find the GPA of the...

Create a program in Python to change Grades in number and find the GPA of the user Problem: The user wants an easy calculator to calculate their GPA. They want to enter the letter grade (A, B, C, D, F) for 5 classes, the credit hours (1, 2, 3,4, 5) and then run the program to calculate the GPA (3.50- 4.00 A, 3.49 – 2.50 B, 2.49 -1.60 C, 1.59 – .50 D, .49 -0 F) for the semester. Task Create a program in Python with the following characteristics List/Array Decision Loop Function String (change everything to Upper caps using the function) Date and time in the run time.

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

ch=float(input("enter no."))
if ch>=3.50 and ch<=4.00:
print("A")
elif ch>=2.50 and ch<=3.49:
print("B")
elif ch>=1.60 and ch<=2.49:
print("C")
elif ch>=0.50 and ch<=1.59:
print("D")
elif ch>=0 and ch<=0.49:
print("E")

You can run this program . it runs correctly according to the information mentioned by you in the question. You can put the conditional statements inside a function named by your choice. Hope it helps you! Have a nice day.

Add a comment
Know the answer?
Add Answer to:
Create a program in Python to change Grades in number and find the GPA of the...
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
  • Create a GPA calculator in Java. Ask the end user for the credit hours and letter...

    Create a GPA calculator in Java. Ask the end user for the credit hours and letter grade for each class. Once the user is finished with the data entry, calculate and output the overall GPA for the given input. For example, if four classes are input, each of which is a three-hour course, with grades of A, B, B, and B, the overall GPA will be 3.25. The exact user interaction is up to you. As long as the requirements...

  • Modify your PredictGPA.java file from Lab 2 to create a method called GPA that takes a...

    Modify your PredictGPA.java file from Lab 2 to create a method called GPA that takes a string argument (the grade) and returns the corresponding value (ie 4.0 for an A, 3.33 for a B+, etc). Use this method call to reduce the “redundant” code that you had in Lab 2. The program must otherwise still run correctly as to the directions in Lab 2 and compute the GPA after using the method calls to determine the appropriate grade values. Trying...

  • Python please help! Thanks you Write a code to get an unlimited number of grades from...

    Python please help! Thanks you Write a code to get an unlimited number of grades from the user (the user can press enter to finish the grades input, or use a sentinel, for example-1), and then calculate the GPA of all the grades and displays the GPA To do this you might need some help. Try to follow the following process (and check your progress by printing different values to make sure they are as they supposed to be): 1-...

  • Task: You want to calculate a student's GPA for a number of classes taken by the...

    Task: You want to calculate a student's GPA for a number of classes taken by the student during a single semester. (In C# (C sharp)) Inputs: 1. the student's name 2. Class names for the classes taken by the student 3. Class letter grade for the classes taken by the student 4. Class credit hours for the classes taken by the student Processing: 1. Accept and process classes until the user indicates they are finished 2. accumulate the number of...

  • Having trouble with python! Write a program to build a list of grades, print them out,...

    Having trouble with python! Write a program to build a list of grades, print them out, add to them and count occurrences, and find the amount of the 2-digit grade values. Here are the criteria a) Your program “L6QI initials.py" must start with a commented ID Box AND include a comment that indicates the e of the program. EACH of the five functions in your program must state its purpose in comments too The main function in your program must...

  • Problem Specification: Write a C++ program to calculate student’s GPA for the semester in your class. For each student, the program should accept a student’s name, ID number and the number of courses...

    Problem Specification:Write a C++ program to calculate student’s GPA for the semester in your class. For each student,the program should accept a student’s name, ID number and the number of courses he/she istaking, then for each course the following data is needed the course number a string e.g. BU 101 course credits “an integer” grade received for the course “a character”.The program should display each student’s information and their courses information. It shouldalso display the GPA for the semester. The...

  • Create a Python program that asks the user how many miles they think they may run....

    Create a Python program that asks the user how many miles they think they may run. The program should also ask them how much they weight. The program should then use a loop to calculate and print the number of calories burnt while running each mile. o Assume that a person burns 1 calorie per pound during each mile of running

  • Create a C++ program to calculate grades as well as descriptive statistics for a set of...

    Create a C++ program to calculate grades as well as descriptive statistics for a set of test scores. The test scores can be entered via a user prompt or through an external file. For each student, you need to provide a student name (string) and a test score (float). The program will do the followings: Assign a grade (A, B, C, D, or F) based on a student’s test score. Display the grade roster as shown below: Name      Test Score    ...

  • Python: Create a simple program that calls a function call gradeCalculated, in the main area the...

    Python: Create a simple program that calls a function call gradeCalculated, in the main area the user is asked to enter their grade from 0-100. Pass in the number grade via a parameter into the function, based on their grade tell the user what letter grade they got as a letter grade and number and then tell me a quote how you feel about your grade. 90+ A 80-89 B 70-79 C 60-69 D Below 60 F

  • Using Python Write the following well-documented (commented) program. Create a class called Shape that has a...

    Using Python Write the following well-documented (commented) program. Create a class called Shape that has a method for printing the area and the perimeter. Create three classes (Square, Rectangle, and Circle) which inherit from it. Square will have one instance variable for the length. Rectangle will have two instance variables for the width and height. Circle will have one instance variable for the radius. The three classes will have methods for computing the area and perimeter of its corresponding shape....

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