Accept marks from the user allot the stream based on marks

In this python if else program, we will accept marks from the user allot the stream based on the marks.

Steps to solve the program
  1. Accepts the marks from the user.
  2. Using if-else statements allot the stream based on marks.
  3. Print the output.
				
					marks = int(input("Enter marks: "))

if 85 <= marks <101:
    print("Stream alloted: Science")
elif 70 <= marks < 85:
    print("Stream alloted: Commerce")
elif 35 <= marks < 70:
    print("Arts")
elif 0 < marks < 35:
    print("Stream alloted: Fail")
else:
    print("Invalid marks")
				
			

Output :

				
					Enter marks: 88
Stream alloted: Science
				
			

Related Articles

accept two numbers and mathematical operations from users

Leave a Comment