Header Ads Widget

Python program to receive marks of physics, chemistry & math's from user & check its eligibility for course

 

Python program to receive marks of physics, chemistry & math's from user & check its eligibility for course 

Given marks of the subjects , Write a program to receive marks of physics, chemistry & math's from user & check its eligibility for course if a) Marks of physics > 40 b) Marks of chemistry > 50 c) Marks of math’s > 60 d) Total of physics & math’s marks > 150 or e) Total of three subjects marks > 200 . 

Sample input
50 60 100   (Marks of Physics , chemistry and math's)

Sample Output
You are eligible for the course

Python program to receive marks of physics, chemistry & math's from user & check its eligibility for course 

The objective of the code is to check the eligibility for the course .

Code(Python):-
print("Enter the marks of the physics chemistry and math's")
phy,che,math=map(int,input().split())
total=(phy+che+math);
PM=phy+math;
if(phy>40 and che>50 and math>60 and (PM>150 or total>200)):
print("You are eligible for the course")
else:
print("Not eligible")


Output:-

Enter the marks of the physics chemistry and math's
50 60 100
You are eligible for the course




Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-