Pythonclassroomdiary.wordpress.com
CLASS XII INFORMATICS PRACTICES NEW (065) MARKING SCHEME 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)1solarray([-1, 1, 3])[2, 4, 6, 2, 4, 6]b)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.________1solx.reshape(2,3)c)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()1Solutionp.xlabel("Year")p.ylabel("Rate")ORMr. 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()solp.bar(ITEM_NM,QTY)p.title('NO. of Electronic Items')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)2solOriginal Array[[ 5 7 2] [ 8 99 1] [ 1 2 3]]Subset of Array[[ 5 7 2] [ 8 99 1]]valuese)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]2solimport numpy as npimport matplotlib.pyplot as pltx = [21,22,23,4,5,6,77,8,9,10,31,32,33,34,35,36,37,18,49,50,100]num_bins = 5plt.hist(x, num_bins, facecolor='red')plt.show()f)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 87224212551143001 mark for creation of array with 9 ones. ? mark each for updating values01 mark for creation of array with 9 ones. ? mark each for updating valuesimport numpy as npa=np.ones(9)print(a) a[3]=5a[7]=87print(a)g)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 elements3import as np = .array([1,2,3], dtype=np.float64)print("Size of the array: ", x.size) print("Length of one array element in bytes: ", x.itemsize)print("Total bytes consumed by the elements of array :”,x.nbytes) Answer 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 above1ii) rename()b)Rewrite the following python statement divide(power( add(df,2),2),3) using pipe( ) function1Solutionprint(df1.pipe(df1.add,2).pipe(df1.divide,3))c)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])S111754505101600 (1 mark for each correct line of output) (1 mark for each correct line of output)0.50 8.0 0.75 11.0 d)Write a small python code to drop a row from dataframe labeled as 0.1df = df.drop(0)e)What is the difference between Pivot() and Pivot_Table () functions2pivot()?is used for pivoting without aggregation. Therefor, it can’t deal with duplicate values for one index/column pair.The pivot table takes simple column-wise data as input, and groups the entries into a two-dimensional table that provides a multidimensional summarization of the data.f)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 2import pandas as pdimport numpy as npdata = {'Manasvi': ['Physics', 'Chemistry', 'English', 'Maths', 'Computer Sc'], 'marks': [ 89,99,97,99,98],}df = pd.DataFrame(data )print("Sum of Marks:",df['marks'].sum())ORimport pandas as pdd=[["Asha",26],["Madhvi",44],["Rohan",26],["Mona",37]]df=pd.DataFrame(d,columns=['Name','Age'])print(df.sort_values('Name'))g)What the following statements are doing? df['city']=['Gwalior','Indore','Agra','Dewas',’Gwalior’,’Indore’] df.loc[2, : ] df.loc[2:4, ‘Name’ : ’Gender’]3solcreating a new column city with new datagetting all columns of row index 2getting rows 2 to 4 with columns Name and Gender1 mark for each correct ansORGiven 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) Hospital [‘Gender’]=[‘M’,’F’,’M’,’M’,’F’]Hospital [‘Age’][2]=30Hospital [‘Charges_with_extra_bed’]=Hospital[‘Charges]+200h)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]3Solution English Chemistry Maths PhysicsStudent1 NaN 78 78 45Student2 NaN 70 67 56Student3 NaN 90 87 65i)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 paid4Solutiondf1.apply_map(np.sqrt)df1.apply(np.mean)df1.count()df.loc[1:2].sum(axis=1)Section B3a)Identify Delivery model among the following modelsWaterfallSpiralConcurrentNone of the above1solSpiralb)Identify incorrect statement in respect of need of software engineeringThe software deliver in timeSoftware costs remain within budgetThe software is unscalable and adaptableConforms the specification1sol3.The software is unscalable and adaptablec)Write down any one benefit of pair programming.1d)Name the members of Basic Scrum TeamORWhat are the drawbacks of Spiral Model ?22887980698502 marks for mentioning 3 correct members02 marks for mentioning 3 correct membersProduct OwnerDevelopment TeamScrum MasterOR42310056985OR 2 marks for any of the 4 correct drawbacks00OR 2 marks for any of the 4 correct drawbacksCan be a costly?model?to use.Risk analysis requires highly specific expertise.Project's success is highly dependent on the risk analysis phase.Doesn't work well for smaller projects. It is not suitable for low risk projects.May be hard to define objective, verifiable milestonee)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.3?In "The Waterfall" approach, the whole process of software development is divided into separate phases. In this Waterfall model, typically, the outcome of one phase acts as the input for the next phase sequentially.AdvantagesSimplicityLining up resources with appropriate skills is easyProcess and results are well documented.Clearly defined stages.Works well for smaller projects where requirements are very well understood.DisadvantagesHighly impractical for most projectsPhases are tightly coupledNo working software is produced until late during the life cycle.High amounts of risk and uncertainty.Not a good model for complex and object-oriented projects.Poor model for long and ongoing projects.(1 mark for correct definition 1 mark for any 2 advantages and 1 mark for any 2 disadvantages)f)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 System3They all have their own copy along with personal working copy. They all will have to commit changes in their own repository. The other member can see the changes if the developer pushed the changes from his/her local repository to central repositoryg)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’].17372071323281737207400552Use 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 System 2456815-121475500252730-133032500b)Write MySQL cmmand to sort the record of Books (Table Name: Bk_Rec) in descending order of book_name 1solSELECT * FROM Bk_Rec ORDER BY book_name DESC;c)How CSV file can be viewed.1Using Notepad / Excel d) Asha wants to change the book_name from IP to Info Practices stored in MySQL table Bk_Rec. Help her to write command to do the same1 UPDATE Bk_Rec SET book_name=’ Info Practices’ WHERE book_name=”IP”e)Write the command to install required package for Python MySQl Connectivity1sol Pip install mysql.connectorf)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(*)3solOrder By is used to arrange the records in Ascending/Descending order on specified column where as Group by is used to group data based on common valuesCount(column_name) counts no. of not null values present in Column_name specified where as count(*) counts total no. of rows present in the Tableg)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 age.solDegree – 6 Cardinality -10Count(AGE)------------------ 3SELECT AGE, COUNT(*) FROM STUDENT GROUP BY 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 studentsOR What is CSV File ?Write 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.4Aggregate function?or?aggregation function?is a?function?rows?are?grouped together to form a single summary value.?AVG(), SUM(), COUNT(), MIN(), MAX() etc ( 1 mark for any 2 correct name)SELECT SUM(ADM_FEE) FROM STUDENT WHERE FEE IS NULLSELECT MIN (FEE) FRM STUDENT;OR2754630297815(1 mark for correct definition of CSV ,1 mark for correct opening of csv file in read mode, 1m ark for csv.reader() command and 1 mark for printing content of csv file)00(1 mark for correct definition of CSV ,1 mark for correct opening of csv file in read mode, 1m ark for csv.reader() command and 1 mark for printing content of csv file)CSV : A Comma Separated Values (CSV)?file?is a plain text?file?that contains a list of data.? open('MyFile.csv', 'r') with FILE: R = csv.reader(FILE) for row in R: for data in row: print(data)Section D5a)_________ Theft is the online theft of personal information in order to commit fraud 1Identity Theftb)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?1Plagiarismc)Give any 2 examples of digital properties.1Any online personal website/blog , personal Account (email, shopping A/c, Gaming A/c,storage AC etc) , domain name registered in your name,intellectual propertiesIt may be Computing hardware, such as computers, external hard drives or flash drives, tablets, smartphones, digital music players, e-readers, digital cameras, and other digital devices1 mark for any correct examplesd)What is IT Act 2000? Explain2The Information Technology Act, 2000 is an Act of the Indian Parliament notified on 17 October 2000. It is the primary law in India dealing with cybercrime and electronic commercee)Give examples of Hardware and software that may be used for students with special needs.2Joystick specially made for this purposeFor low visioned Students Braille keyboards/ monitors/ printers should be made available Online App For Assessing Individual Academic PerformanceUsing technical tools intended for?human speech recognition and synthesizing2 marks for any 2 correct examplesf)Explain the role of online social media campaigns, crowdsourcing and smart mobs in society.ORKendriya Vidyalaya XYZ has many Computers and Printers which are not usable obsolete hardware. How and What can be done to dispose these unusable items3Role of Social Media Campaigns:- A social media campaign should focus around a singular business goal, whether it's on Facebook or Instagram. Common goals for a social media campaigns include: Getting feedback from users. Building email marketing lists Increasing website traffic Crowdsourcing is the practice of engaging a ‘crowd’ or group for a common goal — often innovation, problem solving, or efficiency. It is powered by new technologies, social media and web 2.0. Crowdsourcing can take place on many different levels and across various industries.Smart mobs, so named because each person in the group uses technology to receive information on where to go and what to do. This ability to stay on top of current events makes smart mobs extremely effectiveORWe can opt any of the following option to dispose electronic items:1. We may give our obsolete Electronic Waste to a Certified E-Waste Recycler2. we can Donate our Outdated items to needy one3. Give it Back to Electronic Companies and Drop Off(1 mark for one correct role of social media campaign, 1 mark for one correct role of Crowdsourcing and 1 mark for one correct role of Smart mob)OR(1 mark for each correct ways of disposing e waste)f) What do you mean by Internet Addiction2Internet addiction is described as an impulse control disorder, which does not involve use of an intoxicating drug and is very similar to pathological gambling.? Some Internet users may develop an emotional attachment to on-line friends and activities they create on their computer screens. Internet users may enjoy aspects of the Internet that allow them to meet, socialize, and exchange ideas through the use of chat rooms, social networking websites, or "virtual communities."???g) What is Cyber crime?2Cybercrime?is defined as a?crime?in which a computer is the object of the?crime?(hacking, phishing, spamming) or is used as a tool to commit an offense (child pornography, hate?crimes). ...?Criminals can?also use computers for communication and document or data storage.f) Define Phishing ii. Scams iii. Illegal download3Phishing is a cyber attack that uses disguised email as a weapon. The goal is to trick the email recipient into believing that the message is something they want or need — a request from their bank, for instance, or a note from someone in their company — and to click a link or download an attachment.SCAM : A fraudulent scheme performed by a dishonest individual, group, or company in an attempt obtain money or something else of valueIllegal download: Illegal downloading is obtaining files that you don’t have the right to use from the internet.Digital piracy involves illegally sharing copyrighted media such as games, music, movies, TV shows and software.1 mark for each correct definition ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- a brief tutorial on maxent university of florida
- university of washington
- com
- graphing in vpython with credit to bruce sherwood and the
- graphical method of solution of a linear programming problem
- introduction
- math framework chapter 5 curriculum frameworks ca dept
- max marks 70time 3 hrs
- microsoft word informatics practices
Related searches
- wordpress passing data between pages
- wordpress business templates
- wordpress rss feed not working
- wordpress jquery is not defined
- create wordpress blog
- wordpress roles editor
- wordpress full rss feed
- wordpress rss feed settings
- wordpress rss feed plugin
- wordpress display rss feed
- wordpress rss feed link
- wordpress rss feed to post