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

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz