Skip to main content

Command Palette

Search for a command to run...

Day 13: 100 Days of Python

Published
•1 min read•View as Markdown
I

I am Junior Data Scientist, using python for my analysis and modelling. I have few projects i have worked on and I'm loving this process. I'm open to working with anyone willing to help me through this process.

#DAY 13 Of 100Days od code

print ("EXAM GRADE CALCULATOR")
print()
student = input("what is your name:  ")
subject = input("what subject exams did you write recently: ")
score = int(input("what was your score in the exams you wrote:  "))
total = int(input("maximum possible score: "))
print()
total_score = float(score/total)
final_score = round(total_score, 2)
percentage_score = round(float(score/total)*100, 2)
print()
print ("You got ", percentage_score,"%")
print()
if final_score >= .90:
  print ("Congratulations!!! ", student, "you are an A+ student in ", subject, "exams")
elif final_score >=.80 and final_score <= .89:
  print ("Congratulations!!!, ", student, "you are an A- student in ", subject, "exams")
elif final_score >= .70 and final_score <= .79 :
  print("Great!! ", student, "you are a B+ student in " ,subject, "exams")
elif final_score >= .60 and final_score <= .69:
  print("Well-done!! ", student, "You a C student in ", subject, "exams")
elif final_score >= .50 and final_score <= .59:
  print("Good", student, "you are a D student in ", subject, "exams")
elif final_score <= .49:
  print("Good", student, "you are an F student in ", subject, "exams")
else:
  print ("Hello", student, "you might need to try again")