Answer to Question #218640 in Python for Ravichandrasekhar

Question #218640

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.

Input

The first line is an integer

M, the second line is an integer P, and the third line is an integer C.Output

The output should be a single line containing

True if it satisfies the given conditions, False in all other cases.

Sample Input

82

55

45

sample output:True

Sample Input

71

30

70

Sample Output:False




1
Expert's answer
2021-07-19T16:59:17-0400
# 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.


M=int(input("Enter marks for Maths: "))
P=int(input("Enter marks for Physics: "))
C=int(input("Enter marks for Chemistry: "))


if(((M+P>=100) or (M+C>=100) or (P+C>=100)) and (M+P+C>=180)):
    print("TRUE")
else:
    print("FALSE")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS