Answer to Question #231093 in Python for umesh

Question #231093

Eligibility Criteria - 4

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. If any one of the below conditions is satisfied then the student is eligible.1) M >= 60, P >= 50, C >= 45 and M + P + C >= 180.

2) Total in M and P >= 120 or Total in C and P >= 110.

Input

The first line is an integer

M The second line is an integer P The third line is an integer COutput

The output should be a single line containing

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

Given

M = 72, P = 65, C = 51, the scores of this student satisfies the first condition


M >= 60, (72 >= 60)

P >= 50 (65 >= 50)

C >= 45 (51 >= 45)

M + P + C >= 180 (72 + 65 + 51 >= 180)

 


So, the student is eligible.


1
Expert's answer
2021-08-31T17:36:18-0400
M = int(input())
P = int(input())
C = int(input())
print((M >= 60 and P >= 50 and C >= 45 and M + P + C >= 180) or (M + P >= 120 or C + P >= 110))

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