Max Marks: 70Time: 3 hrs - Python Class Room …



CLASS XII INFORMATICS PRACTICES NEW (065) I PREBOARD (2019-20)Max Marks: 70Time: 3 hrsGeneral Instructions:All questions are compulsoryQuestion Paper is divided into 4 sections A,B,C and D.Section A comprises of questions(1 and 2)Question 1 comprises Data Handling-2(DH-2)(Series,Numpy)Question 2 comprises of question from Data Handling -2(DH-2)(Data Frames and its operations)Section B comprises of questions from Basic Software Engineering.Section C comprises of questions from Data Management-2(DM-2)Section C comprises of questions from Society, Law and Ethics-2(SLE-2)Section AAnswer the following questions :1a)Given an ndarray X with element 2, 4, 6. What will be the result produced by following statementsprint(np.subtract(X,3))print(X + X)1b)Fill in the blank with appropriate numpy method to convert array X from shape 6 to shape 2X3import numpy as np x = np.arange(6) x.________1c)266890537655500Ms. Manasvi plotted a bar graph to show production rate of rice in different years. She has written the following statements. Which results into the following figure. She also wants to display labels on X and Y axis. Help her to write the suitable statements.import matplotlib.pyplot as pYr=[2000,2002,2004,2006] rate=[29.0,20.7,15.2,21.6]p.bar(Yr,rate)……………(statement 1)……………(statement 2)p.show()1ORMr. Aditya wants to draw a bar chart using a lists of elements named QTY & ITEM_NM Complete the code to perform the following operations:To plot a bar chart using the given lists,To give a Title to the bar chart named “NO. of Electronic Items’import matplotlib.pyplot as p QTY=[1,4,7,9,11]ITEM_NM=[‘TV’,’AC’,’COOLER’,’FREEZE’,’COMPUTER’] Statement 1 Statement 2 PL.show()d)Find out the output of the following codeimport numpy as npa2=np.array([[5,7,2],[8,9,1],[1,2,3]])sub_a2=a2[:2,:]sub_a2[1,1]=99print("Original Array")print(a2)print("Subset of Array")print(sub_a2)2e)Write code to draw the histogram for the following series. Colour of bars should be in red colour and bins=5 x = [21,22,23,4,5,6,77,8,9,10,31,32,33,34,35,36,37,18,49,50,100]2f)Write code to create an ndarray having 9 ones in it. Write statements to change 4th and 8th elements of this array to 5 and 872g)Write a NumPy program to find the number of elements of an array, length of one array element in bytes and total bytes consumed by the elements3Answer the following questions2a)_ method in Pandas can be used to change the label of rows and columns of a Series or Dataframe :replace()rename()reindex()none of the above1b)Rewrite the following python statement divide(power( add(df,2),2),3) using pipe( ) function1c)Consider the following python code and write the output for statement S1 import pandas as pdK=pd.series([2,4,6,8,10,12,14]) K.quantile([0.50,0.75])S11d)Write a small python code to drop a row from dataframe labeled as 0.1e)What is the difference between Pivot() and Pivot_Table () functions2f)Write a panda program to read marks detail of Manasvi and Calculate sum of all marks ORWrite a small python code to create a dataframe with headings(Name and Age) from the list given below : [[‘’Asha”,26],[“Madhvi”,44],[“Rohan”,26],[“Mona“,37]]Now sort the data as per the name 2g)What the following statements are doing? df['city']=['Gwalior','Indore','Agra','Dewas',’Gwalior’,’Indore’] df.loc[2, : ] df.loc[2:4, ‘Name’ : ’Gender’]3ORGiven a Dataframe Hospital. Write the commands to do the following: IdNameAgeDepartmentCharges0Arprit62Surgery3001Zarina22ENT2502Kareem32Orthopaedic2003Arun12Surgery3004Zubin30ENT2505Kettaki16ENT250Add a new column Gender in data frame Hospital Update the Age of Kareem as 30Add a new column Charges with extra bed which contains values as (charges +200) h)Find the output of the following code:>>> L_dict = [{'Maths': 78, 'Chemistry': 78,'Physics':87},{'Maths': 67, 'Chemistry': 70},{'Physics':77,'Maths':87,'Chemistry':90}]>>> df3 = pd.DataFrame(L_dict, index=['Student1', 'Student2', 'Student3'], columns=['English','Chemistry','Maths'])>>> df3['Physics']=[45,56,65]3i)Consider the following DataFrameimport pandas as pdimport numpy as npd1={'Sal':[50000,60000,55000],'bonus':[3000,4000,5000]}df1=pd.DataFrame(d1)Write the python statement using suitable functions among (apply/ apply_map / sum() / mean()________________________#To calculate square root of each element of data frame________________________# To Calculate mean()________________________# To Calculate total no. of non null values in each column ________________________# To Calculate Total salary and total bonus paid4Section B3a)Identify Delivery model among the following modelsWaterfallSpiralConcurrentNone of the above1b)Identify incorrect statement in respect of need of software engineeringThe software deliver in timeSoftware costs remain within budgetThe software is unscalable and adaptableConforms the specification1c)Write down any two benefits of pair programming.1d)Name the members of Basic Scrum TeamORWhat are the drawbacks of Spiral Model ?2e)Explain Water fall model. What are its advantages and disadvantages.ORWrite down any one situation where spiral delivery model can be used. Also mention one advantage and one disadvantage of spiral delivery model.3f)Anya , Pihu and Pranshu were working on a software . They have made changes in their personal working copy. Now what will be the next step if they are following Distributed Version Control System3g)We know that it is very costly to get a ’Certified Java Programmer’ certificate? It could cost you thousands of euros. Let’s imagine we will develop a browser-based training system to help people prepare for such a certification exam.A user can request a quiz for the system. The system picks a set of questions from its database, and compose them together to make a quiz. It rates the user’s answers, and gives hints if the user requests it.In addition to users, we also have tutors who provide questions and hints. And also exam- inators who must certify questions to make sure they are not too trivial, and that they are sensical. Make a use case diagram to model this system. Work out some of your use cases. Since we don’t have real stake holders here, you are free to fill in details you think is sensical for this example.4Answer:We’ll assume multiple choice quiz.1737207226576Use case: Make quiz. Primary actor: User Secondary actors: -Pre-condition: The system has at least 10 questions.Post-condition: -Main flow:The use-case is activated when the user requests it.The user specifies the difficulty level.The system selects 10 questions, and offers them as a quiz to the user.The system starts a timer.For every question:5a. The user selects an answer, or skip. [Extension point]If the user is done with the quiz, or the timer runs out, the quiz is concluded, and [include use case ’Report result’].1737207132328173720740055293980-2927350Report result{include}Add questionsMake a quizTutor{include}User{extend}Certify questionsProvide hintExaminator00Report result{include}Add questionsMake a quizTutor{include}User{extend}Certify questionsProvide hintExaminatorUse case: Provide hint Primary actor: User Secondary actors: -Pre-condition: The user requests for a hint.Post-condition: -Main flow:The system provides a hint. The verbosity of the hint is determined by the difficulty level set previously by the user.Return to to Make quiz’ main flow.ORDraw a Use-Case Diagram for an online Book StoreDraw a Use Case Diagram depicting ATM SystemSection C4a)Write the Django commands to create a New Project namely “Sports” Create App “Cricket” under the Project Sports1b)Write MySQL command to sort the record of Books (Table Name: Bk_Rec) in descending order of book_name 1c)How CSV file can be viewed.1d) Asha wants to change the name of the book from IP to Info Practices stored in MySQL table Bk_Rec. Help her to write command to do the same1e)Write the command to install required package for Python MySQl Connectivity1f)Mayank has recently started working in MySQL. Help him in understanding the difference between the following :Order by and Group ByCount(column_name) and count(*)3g)On the basis of following table answer the given questions:3(i) Write the degree and cardinality of the above table.(ii) What will be the output of the following query :Select count(AGE) From STUDENT where POINTS>6;(iii) Write the sql query to display records of total no. of students belongs to same ageh) i) What do you mean by Aggregate Functions ii) Name any 2 Aggregate Functions iii) Consider the table Student Student (rollno,name,class,category,adm_fees, fee) Write the query to calculate the total adm_fees of those students who do not have to pay fee (contains NULL).iv) Write a query to get the Minimum fee paid by students4ORWrite the code in python to read the contents of “MyFile.csv” fileconsisting of data from a mysql table and print the data of the table on the screen in tabular form of the table.Section D5a)_________ Theft is the online theft of personal information in order to commit fraud 1b)Preeti has stolen some of the contents from someone’s intellectual work and represented it as her own work. What type of offence has she committed?1c)Give any 2 examples of digital properties.1d)What is IT Act 2000? Explain2e)Give examples of Hardware and software that may be used for students with special needs.2f)What do you mean by Internet Addiction2g).Define Phishing ii. Scams iii. Illegal download3 ................
................

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

Google Online Preview   Download