0% found this document useful (0 votes)
6 views1 page

Python Day 9

Uploaded by

asifmahaldar00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Python Day 9

Uploaded by

asifmahaldar00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

integer1 = []

string1 = []
list1 = []

for i in range(1,4):
user_input = eval(input(f"Enter input : "))
if isinstance(user_input, int):
integer1.append(user_input)
elif isinstance(user_input, str):
string1.append(user_input)
elif isinstance(user_input, list):
list1.append(user_input)

print(integer1)
print(string1)
print(list1)

===================================================================================
==
'''ask user to enter the marks in 4 subjets if any
one the subject he scored less than 35 the he is failed ,
otherwise give him a class such as 35-60% second class ,
60-80% first class , more than 80 distinction'''
li = []
for x in range (0,4):
marks = int(input('enter the marks :'))
li.append(marks)
for el in li:
if el > 80:
print('distinction')
elif el <= 80 and el >= 60:
print('first class')
elif el < 60 and el >= 35:
print('second class')
else:
print('fail')

===================================================================================
=

You might also like