a). What will be the output of the following code? [1]
Import numpy as n
L= [1,2,3,4]
X=n.array(L)
print(X)
b). What is pivoting? [1]
c). Which function is used to create the scatter graph? [1]
d) Write a program to create an array with values ranging from 1 to 100 with the difference of 10. [2]
e) What do you mean by reindexing? Which functions are used to reindex the data? [2]
f) How chart will be created by showing different height bars? What is the function used in it? [2]
g) Write a program to create a one dimensional array of size 8 with all elements as zero, but the fourth element should be 5. [3]
a) The output of the following code will be: [1,2,3,4]
b) Data pivoting is a summarising technique to rearrange the rows and columns in a report so as to change the view point of data in different prespective.
c) Matplotlib.pyplot.plot() and matplotlib.pyplot.scatter()
d) import numpy as n
x=n.numpy(1,100,10)
print(x)
e) When we create the dataframe object it get the row numbers and columns labels automatically but if we want to change the row numbers and column labels we can do so with help of reindexing.
The methods used in reindexing are:
Rename(),reindex() and reindex_like()
f) We can create the chart by showing different height bars by bar chart. Bar chart is a graphical representation of data using bars which is of different height. It can be drawn horizontally or vertically using rectangles.
bar() function is used to create the bar chart.
g) import numpy as n
X=np.zeros(8)
X[3]=5
Print(X)
a) __________ step value means reversed order of elements.[1]
1. Positive
2. Negative
3. Boolean
4. Conditional
b) Sham wants to work with DataFrames so which library he will import to use its functions and also how he can check its version? [1]
OR
Name the high quality plotting library of python?
c) Which function is used arrange the data in ascending or descending order? Write its syntax.[1]
d) What is the usage of quantile and var() function? [1]
e) There is a data frame given and 3 rows has to be accessed, so what will be the syntax of accessing multiple rows? How column can be access ?[2]
f) What is the difference between pivot() and pivot_table() function? [2]
g) What is difference between apply() and applymap() functions? [3]
h) Given below is the data frame. Write the following code of the following: [3]
| Colour | Count | Price |
Rose | Red | 10 | 200 |
Lily | White | 11 | 150 |
Freesia | Orange | 9 | 145 |
Lotus | pink | 20 | 500 |
Rose | Pink | 14 | 300 |
Lily | Pink | 17 | 250 |
1. Find out all the rows of rose. Extract the columns.
2. List only rows with labels ‘lily’ and ‘lotus’ using loc
3. List only ‘count’ and ‘price’ using loc
i) What is quartile? How quartile and quantile are related? How quantile is generated in pandas? [4]
a) ii)
Negative step value means the order will start from the end of the list.
b) A:Sham will import pandas library and the version can be checked as
import pandas as p
print(pd.__version__)
OR
matplotlib is the high quality plotting library of python.
c) sort_values function is used to arrange the data in ascending or descending order.
.sort_values(by,axis=0,ascending=True, inplace=false,kind=’quicksort’, na_position=’last’)
d) Quantile are the points in the distribution which relate to the rank order of values in that distribution.
The var() function computes variance and returns unbiased variance over requested axis.
e) The syntax of accessing multiple rows is:
.loc[ : ]
Column can be accessed by:
[]
f) pivot() doesnot supports multiple entries of a row column combination
Pivot_table() function supports multiple entries for a row,column combination.
g) apply() is a series function, so it applies the given function to one row or one column of dataframe
Applymap() is an element function, so it is applies the given function to each individual element separately.
h)
1.data.loc[‘Rose’,:]
2.data.loc[[‘liliy’,’lotus’]]
3.data.loc[:,[‘count’, ‘price’]]
i) Quartiles Q1, Q2 and Q3 are three points that divide a distribution into four parts. The 4-quantiles are called quartiles. In quantile the value of distribution donot need to be multiple of 0.25 while quartiles are multiples of 0.25 .
These all are generated with quantile() function.
a) What is verification? [1]
b) Choose the correct option from the given options: [1]
The ________ is a linear approach of software development where one phase is made and then moved down to another phase.
1. Waterfall model
2. Spiral model
3. Incremental model
4. Evolutionary model
c) What is sprint? [1]
d) Name a type of distributed version control system? Give its useful features. (Any two) [2]
e) Where use-case diagrams are used? How many types of use-case diagrams are there? [3]
f) Ram, Sham and Sam are three developers working on an exciting new app, and the launch day is just a day away. Ram creates an unmanaged package and saves it Sam’s folder. Sham also writes a new piece of code and saves it in Sam’s folder. What could go wrong on the day of the launch? Explain and also mention how version control can help teams in this scenario. [3]
g) What is an actor? Draw a use-case diagram of airport check-in and security scheme? [4]
a) Verification is set of activities that are carried to confirm that the software correctly implements the specific functionality.
b) 1)
The waterfall model is a linear approach of software development where the software development takes place sequentially.
c) The sprint is a period of time when software development is actually done, the main motto of sprint is to create a salable product.
d) Git is a distributed version control system.
Git comes with many useful features like:
1. Automatic backup of the whole repository is taken; in case of loss of a repo it is available in other workstations too.
2. Git provides many efficient algorithms for working.
e) The various uses of use case diagrams are:
1. Specify the context of a system.
2. To take the requirements of the system.
3. Validate the system architecture
4. Used for implementation and generate test case
There are two types of use-case diagrams
1. Business use-case diagram: it is used to define a system at an abstract level.
2. System use-case diagram: it is used to define a system at implementation level.
f) As the team members are not working in the proper way and they are not saving the version to themselves which can lead to inconsistency later. Changes made by one developer in the software can be incompatible to those who are working at the same time.
Version control exists to solve this problem, and within easy reach of the developer. Version control helps team to solve the problem by not creating inconsistency and keeping the track of the changes made by an individual.
g) An actor is a person or thing, which are outside the system and are involved in a task. The use case diagram of an airport check-in and security scheme is given below:
a). What is HTTP Get Request? [1]
b) Write the syntax to create table in MYSQL?[1]
c) State primary key? [1]
d) Give the full form of CSV? [1]
e) Name some of the constraints that are applied on the table column? [1]
f) Differentiate between DDL, DML and DCL commands. [3]
g) Given below is the table answer the question based on it.[3]
Employee
Emp_ID | E_Name | E_Address | E_Dept |
1 | ANU | CIVIL LINES BATHINDA | COMPUTER |
2 | BHAWANA | MALL ROAD SHIMLA | PHYSICS |
3 | CARROL | MG ROAD GURGAON | CHEMISTRY |
4 | DIA | CROSSING RPUBLIK GHAZIABAD | BIOLOG |
Write the query:
1. To insert in table the 5th emp_id with its details.
2. To display EMP_ID and E_Name of an employee.
3. To change the address of Emp_ID =2 from Shimla to GUJRAT.
h) Define data type? What is the aim of data types? [4]
a) An HTTP Get Request means to receive information from web server by using a given URL over web..
b) The syntax of CREATE TABLE is:
Create table < table-name >
(< column name >< data type >[(< size >)],
< columnname >< data type >[(< size >)…..])
c) The set of one or more attribute which uniquely identify the tuple within the relation is known as primary key.
d) CSV stands for “comma-separated values”.
e) NOT NULL, DEFAULT, UNIQUE, CHECK, Primary key, Foreign Key are some of the constraints that are applied to table column.
f) DDL: Data Definition Language is used to define the data structure. The statements included in DDL are: create, alter, drop, truncate, comment and rename.
DML : Data Manipulation Language is used to manage data within schema object. The statements included in it are: select, insert, update, delete and merge.
DCL: Data Control Language to control the access to data stored in a database. The statements included in it are: Grant and revoke.
g)
i) INSERT INTO Employee
VALUES ( 5, ‘TIA’, ‘Model Town’ , ‘MATHS’)
ii) select EMP_ID and E_Name from Employee
iii) UPDATE Employee SET E_Address=MALL ROAD GUJRAT where Emp_ID=2
h) SQL Data type defines the value type that can be stored in a table column. For example if we want to store the number in a table we can store it as int data type.
The main of data types are:
1. Best usage of storage space
2. Represent all possible values
3. Improve data integrity
a) Define Plagiarism? [1]
b) What is open source software? [1]
c) State credit card fraud? [1]
d) What is secure data transmission? What technical ways are used to ensure the secure data transmission? [2]
e) Explain the way in which technology is helping student with disabilities.[2]
f) What is crowd sourcing? What are the advantages of crowd sourcing? [3]
a) Plagiarism is stealing someone else’s work and representing it as our own work without giving credit to creator.
b) Open source software is the one which is released under license, in which we can change and distribute the software to anyone but open source software is not free.
c) Credit card fraud includes stealing of credit card, unauthorized and illegal use of credit card.
d) Secure data transmission means that applying the safeguards so that data travels safely to its target, without being accessed by any other person.
The various techniques applied to the data are:
1. SSL secure data transmission
2. Data encryption
3. Using safe protocols
e) Different tools which are assisting student with disability are:
1. Talking word processor
2. Screen readers
3. Conversation of local language to braille
4. Eye tracking mouse
f) Crowd sourcing refers to the obtaining the contribution from the crowd in form of services, content or ideas from online community.
The main advantages of crowd sourcing include:
1. Innovative ideas
2. Sharing of ideas
3. Cost saving
4. Increased efficiency.
Take your CBSE board preparation to another level with AI based and rich media animation on Extramarks - The Learning App.
Features of Learning App