Question

In: Computer Science

Lab 3.4 Write a program that determines a student’s grade. The student will enter a grade...

Lab 3.4

Write a program that determines a student’s grade. The student will enter a grade and the program will determine if that grade is an A, B, C, D, or E.

The student can only enter number 0-100.

A = 90-100

B = 80-89

C = 70-79

D= 60-69

E = 59 or less

Save the file as Lab3.4 and submit the file.

Use https://repl.it/

THIS LANGUAGE IS PYTHON

Thank you :)

Solutions

Expert Solution

#reading the grade from user

grade=int(input("Enter grade: "))

#checking if it greater than 90

if grade>=90:

print("Grade : A")

#checking if it greater than 80

elif grade>=80:

print("Grade : B")

#checking if it greater than 70

elif grade>=70:

print("Grade : C")

#checking if it greater than 60

elif grade>=60:

print("Grade : D")

else:

print("Grade : E")

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me


Related Solutions

Write a program that determines a student’s grade. The program will read three types of scores...
Write a program that determines a student’s grade. The program will read three types of scores (quiz, mid-term, and final scores) and determine the grade based on the following rules: -if the average score =90% =>grade=A -if the average score >= 70% and <90% => grade=B -if the average score>=50% and <70% =>grade=C -if the average score<50% =>grade=F Using Switch Statement Need to code to be simple to understand. No pointers should be used
1. ​ a)​Write a Matlab program to define student grade program and student number with if-else...
1. ​ a)​Write a Matlab program to define student grade program and student number with if-else statement logic​​​​​​​​​ b)​Write a Matlab program for sensor selection of temperature, pressure, flow sensor with if-else statement logic​​​​​​​​​ ​ 2.​Assume there are four letters from an information source with probabilities as A1 0.5 A2 0.3 A3 0.1 A4 0.1 Generate the tag and find the corresponding gaps and binary values for each stage and the sequence of the symbols which are coded are a1a3a2a4a1.​​​...
Write a c++ program that given a set of letter grade/credit hour combiniation, determines the grade...
Write a c++ program that given a set of letter grade/credit hour combiniation, determines the grade point average (GPA) Each A is worth 4 points. Each B is worth 3 points. Each C is worth 2 points. Each D is worth 1 point, and Each F is worth 0 points. The total quality points earned is the sum of the product of letter grade points and associated course credit hours. The GPA is the quotient of the quality points divided...
Write a program that prompts the user enter a word, and determines the first half and...
Write a program that prompts the user enter a word, and determines the first half and second half of the word. Print the first and second half of the word on different lines. Sample runs of the program are shown below. Note: If the word is an odd number of letters, the first half should contain fewer letters (as shown in sample run #2) SAMPLE PROGRAM RUN #1                     Enter a word: carrot First half: car Second half: rot SAMPLE PROGRAM...
Java Program. Sentinel While Loop Lab Do the following: Prompts the user to enter a grade...
Java Program. Sentinel While Loop Lab Do the following: Prompts the user to enter a grade or a -1 to quit. IF the user entered a -1 THEN Display a message that the User is done entering grades ELSE Count each grade as it is entered. Compute a running total of the grades entered. END IF After the user enters the sentinel of -1, calculate the average of the grades entered. When computing the average, make sure that there is...
For this portion of Lab #2, write a program that prompts the user to enter ten...
For this portion of Lab #2, write a program that prompts the user to enter ten integer values between 1 and 100, determines the smallest and largest values entered by the user as well as the average of all the numbers entered by the user (expressed as a floating-point number), and then prints the smallest number, the largest number, and the average. Print each of these values with descriptive labels. Your program output should resemble the following (the user's input...
write a program that will display student grade if scores is greater than or equal to...
write a program that will display student grade if scores is greater than or equal to 70 to display A or else if score is less than or equal to 70 and greater than or equal to 60 display B if scores is less than 60 or greater than 50 display C else display fail.
Write a program that prompts the user for a grade (0-100), and asks if the student...
Write a program that prompts the user for a grade (0-100), and asks if the student is a graduate student or not. (Y/N).   If the student is a graduate student, the grade is reduced by 10%, because we have a higher expectation for graduate students, in an undergraduate class. The program then computes, and prints the letter grade based on the scale below. 90-100 A 80-89 B 70-79 C 60-69 D 0-60 F The program also provides feedback based on...
Lab 1 Write a C program for a grade calculation to run on ocelot. The source...
Lab 1 Write a C program for a grade calculation to run on ocelot. The source file should have your name & PantherID included in it and it should have an affirmation of originality stating something like: “I affirm that I wrote this program myself without any help form any other people or sources from the internet.”. Code should be nicely indented using a consistent style and commented appropriately. An array should be used for each student, but it is...
Write a C program that calculates a student grade in the C Programming Class. Ask the...
Write a C program that calculates a student grade in the C Programming Class. Ask the user to enter the grades for each one of the assignments completed in class: Quiz #1 - 25 points Quiz #2 - 50 points Quiz #3 - 30 points Project #1 - 100 points Project #2 - 100 points Final Test - 100 points The total of the quizzes count for a 30% of the total grade, the total of the projects counts for...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT