MId-term project

print(“——————INTRODUCTION—————————–“)
print (” hello, The program will calculate your final grade for EMT1111, class”)
print(“———————-YOUR personal INFORMATION—————–.”)
print(” “)
choises=[‘YES’,’yes’,’Y’,’y’]
choice=’Y’
while choice in choises :
lettergrade=”
print(” “)
print(“———————-YOUR personal INFORMATION—————–.”)
fname=input(“Please enter your first name: “)
lname=input(“Please enter your last name: “)
snumber=input(“Please enter your session number: “)
print(” “)
print(” ———————-YOUR GRADES—————–.”)
print(” “)
quizgrade=input(“Your average online quizzes grade is : “)
quizgrade=int(quizgrade)
labgrade=input(“Your average lab’s grade is : “)
labgrade=int(labgrade)
midtermgrade=input( “Your midterm exam grade is : “)
midtermgrade=int(midtermgrade)
finalproject=input(“Your final project grade is : “)
finalproject=int(finalproject)
finalexam=input(“Your final exam grade is : “)
finalexam=int(finalexam)

# computations
finalgrade=quizgrade*0.15+labgrade*0.20+midtermgrade*0.20+finalproject*0.25+finalexam*0.20
finalgrade=int(finalgrade)

# finding the letter grade
if finalgrade>=93:
lettergrade=’A’
elif finalgrade >=90:
lettergrade=’A-‘
elif finalgrade >=87:
lettergrade=’B+’
elif finalgrade >=83:
lettergrade=’B’
elif finalgrade >=80:
lettergrade=’B-‘
elif finalgrade >=77:
lettergrade=’C+’
elif finalgrade >=70:
lettergrade=’C’
elif finalgrade >=60:
lettergrade=’D’
else:
lettergrade=’F’
print(” ————————————YOUR RESULT——————–“)
print(“Your namefname, :”, fname, ” “, lname)
print(“Your ID, :”, fname[0]+lname[0]+snumber)
print(“Your grade is :”, finalgrade,’:’, lettergrade)
choice=input(“Do you want to calculate the grade again? (Y/N) : “)
print(“GOOD BYE”)

 

 

 

 

Leave a reply

Logged in as . Log out?

Your email address will not be published. Required fields are marked *