Python Class Room Diary



KVS RO SILCHAR COMPUTER SCIENCEMarking SchemeSECTION A1.(a) (iii) < 1(b) (i) % operator(ii) for keyword1(c) (i) linspace numpy(ii) dump () pickle1(d)Rewrite the following code in python after removing all syntax error(s).Underline each correction done in the code.To=30x=0while x<To: if x%5==0: print (x*4) else: print (x+3) x=x+12e0VS*4ILCHAR2(f)50 # 60600 # 61060 # 610One mark for each correct line3(g)TO Max=10Min=5(i)ROS(ii)ROLSILCH22(a)One marks for correct answer.1(b)(ii)t2=(6)1(c) (iv) tuple1(d)f d b1(e)251(f)One marks for each part.2(g)import matplotlib.pyplot as pltqdata=[100,200,250,150]lb=['Q1SALE','Q2SALE','Q3SALE','Q4SALE']plt.pie(qdata, labels=lb,explode=[0.2,0,0,0] )plt.title('NUCLEUS MALL')plt.show()Or? Marks for title? marks for exploding1 marks for drawing2(h)def readfile(): c=0 f=open('STORY.TXT') for line in f: if line[-1]=='e': c=c+1 return cORdef DISPLAYVOWEL(): f=open('STORY.TXT') for line in f: line=line.lower() words=line.split() for w in words: if w[0] in ‘aeiou’: print (w) any other methods that works are acceptable. 2(i)def Fibo(n): if n<=1: return 0 elif n==2: return 1 else: return Fibo(n-1)+Fibo(n-2)ORdef sum(n): if n<=0: return 0 else: return n+sum(n-1)any other methods that works are acceptable that employs recursion. Non recursion methods may be awarded 2 marks.3(j)? marks for declaring function definition for each function? marks for checking empty stack or queue in each function1 marks for append or delete node in each function43(a)STAR1(b)Firewall1(c)Optical Fibre1(d)PING1(e)? marks for each correct full forms2(f)1 marks for each part answered correctly.2(g)Identify the type of cyber crime for the following situations:(i) SCAM(ii) Impersonation OR Identity Theft(iii) Online FraudAny other suitable answer may be accepted.3(h) A hospital has set up its Departments for information exchange and data entry.DepartmentNo of computerOncology125Dental25Emergency15Pediatrics 100Distance between departmentsDepartmentsDistanceOncology to Dental85Oncology to Emergency65Oncology to Pediatrics95Dental to Emergency 20Dental to pediatrics30Emergency to pediatrics130(i) Oncology because this dept has highest number of computer.(ii) LAN, all departments within the same campus(iii)ethernet cable(iv) As per Bus or Star topology , between any suitable location saperated 80m or more4Section -B4(a)IN1(b)Alias for a column or Formula1(c)DROP DATABASE KVS.1(d)1 Marks for Correct answer1(e)2 marks for suitable answer2(f)2 marks for suitable answer2(g)Write a output for SQL queries (i) to (iii), and commands for (iv) to (vii) which are based on the table:PRODUCTSPCODE PNAMECOMPANYPRICESTOCKMANUFACTUREWARRANTYP001TVXIOMI149992002018-01-123P002TVSONY259991502017-03-234P003PCLENOVO390001002018-04-092P004PCXIOMI380001202019-20-062P005CAMERASONY180002502017-03-23333900040998Select * from product where pname=’PC’ and stock>110;Select company from products where warranty>2Select company, count(*) from product group by company;Update productset price=price+1where pname='TV'7Section C5(a)cookies1(b)1 Marks for any correct answer.1(c)1 Marks for each part.2(d)Digital property theftPiracy2(e)1 Marks for each difference.2(f)1 Marks for each point.2 ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download