Given a student has scored
M marks in Maths, P marks in Physics and C marks in Chemistry. Write a program to check if a student is eligible for admission in a professional course based on the following criteria:Sum of marks in any two subjects >= 100 and M + P + C >= 180.
The first line is an integer
The output should be a single line containing
Given
M = 82, P = 55, C = 45.
M + P >= 100,(137 >= 100)
M + C >= 100,(127 >= 100)
and, M + P + C >= 180 (82 + 55 + 45 >= 180)
So, the output should be
True.
Sample Input 1
82
55
45
Sample Output 1
True
Sample Input 2
71
30
70
Sample Output 2
False
M=int(input("Maths: "))
P=int(input("Physics: "))
C=int(input("Chemistry: "))
if ((M+P)>=100 or (M+C)>=100 or (P+C)>=100) and (M+P+C)>=180:
print("True")
else:
print("False")
Comments
Leave a comment