Create a project of student database. Which contains two tables STD IX and STD-X. Fill at least 10 records of each table and extract the data of that student who got less marks(less than 40%) in computer subject
Answers
Answered by
1
std9 and std10 contain marks of student which is given below
std9 = [40,75,41,33,25,49,83,99,66,52]
std10 = [56,32,15,27,85,91,62,94,46,66]
#Loop for std9
p9=[]
f9=[]
f10=[]
p10=[]
for i in range(0,len(std9)-1):
if std9[i]<40:
f9.append(std9[i])
if std9[i]>=40:
p9.append(std9[i])
#loop for std10
for k in range(0,len(std10)-1):
if std10[k]<40:
f10.append(std10[k])
if std10[k]>=40:
p10.append(std10[k])
print('Student failed in class 9: ',len(f9))
print('Student passed in class 9: ',len(p9))
print('Student failed in class 10: ',len(f10))
print('Student passed in class 10: ',len(p10))
NOTE: maximum marks of computers exam is 100
above programming language is python 3
-HAPPY CODING
Similar questions