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
- Accepts the marks from the user.
- Using if-else statements allot the stream based on marks.
- 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
Python program to check given number is divided by 3 or not.
If else program to get all the numbers divided by 3 from 1 to 30.
If else program to assign grades as per total marks.
Python program to check the given number divided by 3 and 5.
Python program to print the square of the number if it is divided by 11.
Python program to check given number is a prime number or not.
accept two numbers and mathematical operations from users