Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

006-PROGRAM THAT TAKES THE MARKS OF 5 SUBJECTS AND DISPLAY THE GRADES USING PYTHON #6

Open
atharvaagrawal opened this issue Apr 2, 2020 · 2 comments

Comments

@atharvaagrawal
Copy link
Owner

Condition:

Greater than or Equal to 90 : A Grade
Greater than or Equal to 70 : B Grade
Greater than or Equal to 50 : C Grade
Greater than or Equal to 30 : D Grade
Less than 30 : Fail

Input:

Enter 5 Subject Marks: 60 87 54 65

Output:

C Grade

@Pranjal-Sancheti
Copy link

s1, s2, s3, s4, s5 = map(int,input("Enter marks of 5 subjects: ").split())
total = s1 + s2 + s3 + s4 + s5
if (total > 90):
print("Grade A")
elif (total < 90 and total >= 70):
print("Grade B")
elif (total < 70 and total >= 50):
print("Grade C")
elif (total < 50 and total >= 30):
print("Grade D")
else:
print("Fail")

@Pranjal-Sancheti
Copy link

s1, s2, s3, s4, s5 = map(int,input("Enter marks of 5 subjects: ").split())
total = s1 + s2 + s3 + s4 + s5
if (total > 90):
print("Grade A")
elif (total < 90 and total >= 70):
print("Grade B")
elif (total < 70 and total >= 50):
print("Grade C")
elif (total < 50 and total >= 30):
print("Grade D")
else:
print("Fail")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants