+ 2
How to set range for something.?
for example : to set range for marks of subject pass or fail?
6 Réponses
+ 8
marks=int(input("Enter your mark"))
if( 40 <= marks <=100 ):
print('PASS')
else:
print('FAIL')
I HOPE THIS HELPS.👻
[EDIT]: Thanks for the correction Alvaro. 👻
+ 5
Watch it, @Mr.Robot! The code should look like...
[EDIT] Mr.Robot corrected the code.
+ 4
Jainish You can do it as follow..
for i in range(1,10):
print(i)
output:-
1
2
3
4 up to 9.
+ 3
make a list and set your range in it..
--------------------------------------------
good=[]
for i in range(70,100):
good.append(i)
--------------------------------------------
Then you can just check if the mark is in the list.
if mark in good:
0
dear Mr robot it is not running
0
Mr robot
can you suggest me another method