Homework: Use if-elif-else statements to create a grading system where user inputs a percent grade (0 to 100).
If grade is between 100 and 90: print “A”
else if grade is between 90 and 80: print “B”
else if 70-80: print “C”
else if 60-70: print “D”
else: print “F”
Resources:
Slides: https://docs.google.com/presentation/d/1pt5d4uLt0xl3HokgqYP3JJIa4EvTDPIobdGS1sMszUA/edit?usp=sharing
Code: https://replit.com/join/ljeselilpf-shrav816
Contact info:
shravyassathish@gmail.com (mentor)
Make sure to "Add a comment" with your code to the homework in order to submit your homework assignment!
Recordings for Week 3 Day 1 Class have been sent out :)
score = int(input('Enter the score (0-100)')) if score >= 90 and score <= 100: print('Woah, an A!') elif score > 100: print('EXTRA CREDIT! WOO!') elif score >= 80 and score < 90: print('You get a B!') elif score >=70 and score < 80: print('That\'s a C - good enough.') elif score >= 60 and score < 70: print('That\'s a D. Better luck next time!.') else: print('Really, an F? You can do better than THAT.')
Grade= int(input(What was your score?: "))
If 100 >=grade >90
Print("You nailed it! A 😎😄!")
elif 90 >= grade > 80:
print("OK la..... You get a B😮")
elif 80 >= grade > 70:
print("Work harder.... C😮")
elif 60 >= grade > 50:
print("Horrible. You get a D😓")
else:
print("You failed!!! F! 😤")
score = int(input("Input your score(0 -> 100): "))
if score > 100 or score < 0:
print("Invalid score :/")
elif score >= 90:
print("A")
elif score >= 80:
print("B")
elif score >= 70:
print("C")
elif score >= 60:
print("D")
else:
print("F")
grade = int(input("What is your grade? \n")) if grade >= 90: print("Your letter grade is an A.") elif 90> grade >= 80: print("B") elif 80> grade >= 70: print("C") elif 70> grade >= 60: print("D") else: print("F")
Grade= int(input(what was your score?: "))
If 100 >=grade >90
Print("you did a great job, here is a A")
elif 90 >= grade > 80:
print("nice job here is a B")
elif 80 >= grade > 70:
print("work harder next time here is a C")
elif 60 >= grade > 50:
print("close to an F. Not good here is a D")
else:
print("not good at all. F")
grade = int(input("enter your grade: "))
if 100 >= grade > 90:
print("A")
elif 90 >= grade > 80:
print("B")
elif 80 >= grade > 70:
print("C")
elif 60 >= grade > 50:
print("D")
else:
print("F")
score=float(input("what is your score?"))
if score >= 90:
print("good job. you got a A!")
elif score >= 80:
print("you just got a B")
elif score >= 70:
print("you only got C. do better next time!")
elif score>= 60:
print("you got a D:(")
else:
print("F.")
grade = float(input("Please input the grade of the assignment: ")) if grade >= 90: print("That grade is an A.") elif grade >= 80: print("That grade is a B.") elif grade >= 70: print("That grade is a C.") elif grade >= 60: print("That grade is a D.") else: print("That grade is an F.")
grade = int(input("Enter the percent that you received on the test: "))
if grade >= 90:
print("A")
elif grade >=80:
print("B")
elif grade >= 70:
print("C")
elif grade >=60:
print("D")
else:
print("F")