Assignment 1 A python Application to Calculate your course grade Write a program that asks the user to enter the following information for csis110: • full name, test1 score, test2 score, homework score, • Group presentation score Read all the above data and save each data in its own variable with meaningful variable names. Calculate the class average and the letter grade based on the course assessment: Tests 1 35% Test2 35% Homework 15% Group Presentation 15% Below is a formula to calculate a students final grade based on above assessment:
PYTHON LANGUAGE
Python Program:
# Ask the user to enter the student information
name = input("What is your name: ")
test1 = int(input("What is your test1 score: "))
test2 = int(input("What is your test2 score: "))
homework = int(input("What is your homework score: "))
groupPresentation = int(input("What is your group presentation score: "))
# Calculating the final grade
final_grade = test1*0.35 + test2*0.35 + homework*0.15 + groupPresentation*0.15
# Display all data
print("\nName: ", name)
print("Test1: ", test1)
print("Test2: ", test2)
print("Homework: ", homework)
print("Group Presentation: ", groupPresentation)
print("Course Numeric Grade: ", int(final_grade))
# Calculating the class numeric grade and letter grade
if final_grade>=90 and final_grade<=100:
print("Course Letter Grade: A")
elif final_grade>=80 and final_grade<=89:
print("Course Letter Grade: B")
elif final_grade>=70 and final_grade<=79:
print("Course Letter Grade: C")
elif final_grade>=60 and final_grade<=69:
print("Course Letter Grade: D")
print("Unfortunately you did not pass the class")
elif final_grade>=0 and final_grade<=59:
print("Course Letter Grade: F")
print("Unfortunately you did not pass the class")
else:
print("Invalid Input!")
Step by step
Solved in 2 steps with 3 images