Answer to Question #218641 in Python for Ravichandrasekhar

Question #218641

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:M >= 35, P >= 35, C >= 35 and total in any of the two subjects >= 90.

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.Explanation

Given

M = 50, P = 35, C = 40

Sample Input1:

50

35

40


Sample Output:True


35

35

100

Sample Output:True


1
Expert's answer
2021-07-19T02:45:12-0400
M = int(input())
P = int(input())
C = int(input())


MP = M + P
MC = M + C
PC = P + C


if M >= 35 and P >= 35 and C >= 35 and (MP >= 90 or MC >= 90 or PC >= 90):
    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