Programming Examples
Python program to accept marks of English math and science and display the appropriate stream allotted to the candidate
A school display a notice on the school notice board regarding admission in Class XI for choosing streams according to the marks obtained in English, Maths and Science in Class X Council Examination.
Marks obtained in different subjects | Stream |
Eng., Maths and Science >=80% | Pure Science |
Eng. And Science >=80%, Maths>=60% | Bio. Science |
Otherwise | Commerce |
Write a Python code to accept marks in English, Maths and Science from the console and display the appropriate stream allotted to the candidate.
e=int(input("Enter marks in English: "))
m=int(input("Enter marks in Marks: "))
s=int(input("Enter marks in Science: "))
if(e>=80 and m>=80 and s>=80):
print("Stream: Pure Science ")
elif(e>=80 and m>=60 and s>=80):
print("Stream: Bio Science")
else:
print("Stream: Commerce")
Output
Enter marks in English: 67
Enter marks in Marks: 45
Enter marks in Science: 67
Stream: Commerce