AnswerKeys Pages Deleted
AnswerKeys Pages Deleted
1. Which device is used to regenerate the signals over long distance data transmission: 1
i. Switch
ii. Modem
iii. Repeater
iv. None of the above
Answer: (iii) Repeater , 1 mark for correct answer
2. Whenever we surf the Internet using smartphones we leave a trail of data reflecting the 1
activities performed by us online, which is our ?
i. Data print
ii. Digital activity
iii. Digital footprint
iv. Digital print
Answer: (iii) Digital Footprint, 1 mark for correct answer
3. Unsolicited commercial emails is known as …………..? 1
i. Spam
ii. Malware
iii. Virus
iv. Worms
Ans (i) , Spam 1 mark for correct answer
10. To display First 15 rows of a series object ‘Ser1’, you may write: 1
i. Ser1.tail(15)
ii. Ser1.head()
iii. Ser1.head(15)
iv. Ser1.tail()
Answer : (iii) Ser1.head(15) , 1 mark for correct answer
11. Which of the following statement will install pandas library in python? 1
i. Pip install pandaspd
ii. pip install pandas as pd
iii. pip install pandas.pd
iv. pip install pandas
Answer: ( iv) pip install pandas, 1 mark for correct answer
12 Which protocol allow us to have voice calls over the internet? 1
i. HTTP
ii. VoIP
iii. Video Chat
iv. SMTP
Answer: (ii) VoIP , 1 mark for correct answer.
13 Which one is False about MAC address? 1
i. It is Physical Address of any device connected to the internet.
ii. We can change MAC address of a device.
iii. It is the address of NIC card install in network device.
iv. It is used for track the user’s over internet.
Answer: (ii) 1 mark for correct answer.
14 Which one of the following is an output for SQL statement given below: 1
SELECT DAYNAME('2022-12-07');
i. MONDAY
ii. WEDNESDAY
iii. SATURDAY
iv. FRIDAY
Answer: (ii) WEDNESDAY, 1 mark for the correct answer
15 The act of fraudulently acquiring someone’s personal and private information, such as online account names, 1
login information and passwordsis called as_____.
i. Phishing
ii. Identity Theft
iii. Plagiarism
iv. all the above
Answer: (ii) Identity Theft. 1 mark for correct answer.
16 The method used for X axis label a line graph is 1
i. plt.title()
ii. plt.ylabel()
iii. plt.xlabel()
iv. plt.line()
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17 Assertion (A): - E-waste cause of Damage to the immune system, Skin disease, Multi ailments and 1
Skin problems.
Reasoning (R):- Mostly all electronic waste comprises of toxic chemicals such as lead,beryllium, mercury
etc.
Answer: ( i) 1 mark for correct answer
18 Assertion (A): - When DataFrame is created by using Dictionary, keys of dictionary are set as columns of DataFrame. 1
Reasoning (R):- Boolean Indexing helps us to select the data from the DataFrames using a boolean vector.
SECTION-B
19 Define any 2 limitations of star topology? 2
OR
Answer:
1. Requires more cable length than a linear topology.
2. Dependency on central node: If the hub, switch, or concentrator fails, nodes attached are disabled.
3. More expensive than linear bus topologies because of the cost of the hubs, etc.
4. Requires more cable to setup the network .
2 mark for any 2 correct points or any other relevant points.
Star topology is a topology in which all Bus topology is a topology where each device is
devices are connected to a central hub connected to a single cable which is known as the
backbone.
In star topology, if the central hub fails then In a Bus topology, the failure of the network cable
the whole network fails. will cause the whole network to fail.
Answer:
This is because the column commission contains a NULL value and the aggregate functions do not take into
account NULL values. Thus Command1 returns the total number of records in the table whereas
Command2 returns the total number of non
NULL values in the column commission.
21 What is the difference between the order by and group by clause when used along with the select 2
statement. Explain with an example.
Answer:
The order by clause is used to show the contents of a table/relation in a sorted manner with respect to the
column mentioned after the order by clause. The contents of the column can be arranged in ascending or
descending order.
The group by clause is used to group rows in a given column and then apply an aggregate function eg max(),
min() etc on the entire group.
(any other relevant answer)
1 mark for correct explanation 1 mark for appropriate example
22 Consider a given Series , M1. Write a program in Python Pandas to create the series. 2
Marks
Term1 67
Index Term2 56
Term3 77
Term4 89
Answer:
import pandas as pd
M1=pd.Series([45,65,24,89],index=['term1','term2','t erm3','term4'])
OR
Priya is using her internet connection to book a train ticket. This is a classic example of
leaving a trail of web activities carried by her. What do we call this type of activity? What is the
risk involved by such kind of activity?
Answer:
The continuous use of devices like smartphones, computer desktop, laptops, head phones etc cause a lot of
health hazards if not addressed. These are:
i. Impact on bones and joints: wrong posture or long hours of sitting in an uncomfortable position can
cause muscle or bone injury.
ii. Impact on hearing: using headphones or earphones for a prolonged time and on high volume can cause
hearing problems and in severe cases hearing impairments.
iii. Impact on eyes: This is the most common form of health hazard as prolonged hours of screen time can
lead to extreme strain in the eyes.
iv. Sleep problem: Bright light from computer devices block a hormone called melatonin which helps us
sleep. Thus we can experience sleep disorders leading to short sleep cycles.
Risk involved :
It includes websites we visit emails we send, and any information we submit online,
etc., along with the computer’s IP address, location, and other device specific details. Such data could be used
for targeted advertisement or could also be misused or exploited.
Answer:
a. A 3900
B 4100
b. A 390
B 410
C NaN
D 440
F NaN
Answer:
i. DF[‘Activity’]=[‘Science’,’Commerce ’,’Arts’, ‘Science’]
ii. DF.loc[‘St5’]=[1,’Mridula’, ‘X’, ‘F’, 9.8, ‘Science’]
1 mark for each correct answer.
SECTION -C
Answer:
i. Star
ii. Amlodipine
Levocitrezine
iii. 100
200
1 mark for each correct output
Answer:
½ mark for correct import statement
1 mark for correct dictionary
1 mark for correct use Dataframe method
½ mark for printstatement
28 DataFrame ‘STU_DF’: 3
rollno name marks
0 115 Pavni 97.5
1 236 Rishi 98.0
2 307 Preet 98.5
3 422 Paul 98.0
Perform the following operations on the DataFrame stuDF:
i. Add a new row in dataframe STU_DF with values [444,’karan’,88.0]
ii. Print no of rows and columns in dataframe STU_DF
iii. Delete row for rollno 307.
Answer:
i. STU_DF.loc[4,:]= [444,’karan’,88.0] or STU_DF.loc[4]= [444,’karan’,88.0]
ii. print(STU_DF.shape)
iii. STU_DF.drop(2, axis = 0)
1 marks for each correct statement.
29 3
Identify the type of cybercrime for the following situations:
i. A person complains that Rs. 4.25 lacs have been fraudulently stolen from his/her
account online via some online transactions in two days using NET BANKING.
ii. A person complains that his/her debit/credit card is safe with him still somebody
has done shopping /ATM transaction on this card.
iii. A person complains that somebody has created a fake profile of Facebook and defaming his/her
character with abusive comments and pictures
OR
As a citizen of India, what advice you should give to others for e-waste disposal ? Define them
In details.
Answer:
i. Bank Fraud
ii. Identity Theft
iii. Cyber Stalking
1 mark for each correct type
OR
Write SQL queries using SQL functions to perform the following operations:
i. Display company name and body wheel base after rounding off to nearest ten’s decimal places.
ii. Display the position of occurrence of the string “dan” in body style.
iii. Display the year of manufacturing for sedan;
OR
Helps Abhay to Compare Having clause and Order by clause with the help of example?
Answer:
i. Select company, round(wheel-base,-1) from automobile;
½ mark each for correct usage of Select and round()
As a network expert, provide the best possible answer for the following queries:
i. Suggest a cable layout of connections between the buildings.
ii. Suggest the most suitable place (i.e. buildings) to house the server of this organization.
iii. Suggest the placement of the following device with justification:
a) Repeater b) Hub/Switch
iv. Suggest a system (hardware/software) to prevent unauthorized access to or from the network.
v. The company is planning to link its head office situated in Delhi with the offices in hilly
areas. Suggest a way to connect it economically.
Answer:
i. 1 mark for correct layout
ii. Research Lab
iii. Repeater: Between Accounts and Store, Hub/Switch in each block
iv. Firewall
v. Radio Wave
1 mark for each correct answer or for any other relevant answer
33 Observe the following figure. Identify the coding for obtaining this as output. 5
Also give suitable python statement to save this chart
OR
Write a Python program to display a bar chart of the popularity of programming Languages
Data:
Programming languages: Java, Python, PHP, JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
Also give suitable python statement to save this chart
Answer:
a) import matplotlib.pyplot as plt
eng_marks=[10,55,30,80,50]
st_name=["amit","dinesh","abhishek","piyush","rita"]
plt.plot(st_name,eng_marks)
plt.show()
plt.savefig("aa.jpg")
1 mark for correct import sattement
1 mark for correct declaration of marks and names
1 mark for correct use of plot method
1 mark for correct use of show method
1 mark for corect use of savefigmethod
OR
import matplotlib.pyplot as plt
x = ['Java', 'Python', 'PHP', 'JavaScript', 'C#', 'C++']
popularity = [22.2, 17.6, 8.8, 8, 7.7, 6.7]
plt.bar(x_pos, popularity)
plt.xlabel("Languages")
plt.ylabel("Popularity")
plt.title("PopularitY of Programming Language Worldwide")
plt.show()
plt.savefig(‘CS.jpg’)
½ mark for each correct statement
1 mark for correct savefig method
SECTION -E
34 Consider the Table CLUB given below:
1+1+
COACH_ID COACHNAME AGE SPORTS DATOFAPP PAY SEX 2
1 KUKREJA 35 KARATE 1996-03-27 10000 M
2 RAVINA 34 KARATE 1997-01-20 12000 F
3 KARAN 34 SQUASH 1998-02-19 20000 M
4 TARUN 33 BASKETBALL 1998-01-01 15000 M
5 ZUBIN 36 SWIMMING 1998-01-12 7500 M
Answer the followings based on the above mysql table ‘CLUB’
i. Write sql quesry to display the average pay for karate coach
ii. Write sql query to display month for date of appointment’DATEOFAPP
iii. Write sql query to display the details of male coach in ascending order of their age
OR
iv. Write SQL query to display game wise maximum pay of all caoches.
Answer:
i. SELECT AGV(PAY) FROM CLUB WHERE SPORTS=’KARATE’;
ii. SELECT MONTH(DATEOFAPP) FROM CLUB;
1 mark for each correct query
iii. SELECT * FROM CLUB WHERE SEX=’M’ ORDER BY AGE ASC;
OR
iii. SELECT SPORTS,MAX(PAY) ROM CLUB GROUP BY SPORTS;
2 mark for each correct query
35 Consider the following DataFrame, ClassDF with row index St1,St2,St3,St4 1+1+
2
Rollno Name Class Section CGPA Stream
St1 1 Aman IX E 8.7 Science
St2 2 Preeti X F 8.9 Arts
St3 3 Kartikey IX D 9.2 Science
St4 4 Lakshay X A 9.4 Commerce
Based on the above
dataframe answer the following:
A. Predict the output
i. ClassDF.T ii) ClasDF [ : : -2]
B. Write python statement to print Name,class and CGPA for Student St2 and St3
OR
write python Statement to print the name and class of students having CGPA more
than 9.0
Answer:
A. 1 mark for each correct answer
B. ClassDF.loc[St2:St3 , [‘Name’,’Class’,CGPA’]
OR
ClassDF[[‘Name’,’Class’][ClassDF.CGPA>9.0]
2 marks for each correct answer
KENDRIYA VIDYALAYA SANGATHAN, CHANDIGARH REGION 2022-23
PREBOARD-I
CLASS - XII
INFORMATICS PRACTICES(065)
MARKING SCHEME
20 The problem with the given SQL query is that group by clause is missing in the query. 2
Corrected Query:
SELECT DEPT, MAX(SALARY) FROM EMPLOYEE GROUP BY DEPT;
21 The order by clause is used to show the contents of a table/relation in a sorted manner with 2
respect to the column mentioned after the order by clause. The contents of the column can be
arranged in ascending or descending order.
The group by clause is used to group rows in a given column and then apply an aggregate
function e.g. max(), min() etc. on the entire group.
(any other relevant answer)
22. St={‘Science’ :27, ‘arts’ :38 , ‘commerce’:42} 2
S1=pd.Series(St)
1 mark for each correct python statement
23. The e-waste management- 2
i. Saves the environment and natural resources
ii. Allows for recovery of precious metals
iii. Protects public health and water quality
iv. Saves landfill space
½ mark for each benefit
OR
Intellectual property rights are the rights given to persons over the creations of their minds like
creativity concepts, inventions, industrial models, trademarks, songs, literature, symbols, names,
brands,....etc. They also entitle him/her to prevent others from using, dealing or tampering with
his/her product without prior permission from him/her.
It should be protected since:
1. New innovations in all IPR domains lead to Human progress and advancement.
2. Legal protection of new innovations encourages safe spending on other innovations.
3. Caring for and protecting IPR contribute to achieving economic and social development.
24 a. [10,20,10,20] – Replication 2
b. [20,40] - Multiplication
25 i. Shape of Dataframe is (4,3) 2
ii. Name of index are: 0,1,2,3 and column names are: ID, Name, Marks
1 mark for each correct statement
SECTION-C (3 MARKS)
26 (a) 3
Avg(exp)
9
(b)
Id Name Doj Dept Gen Exp
der
6 Danish 11-09-2013 Personnel M 8
(c)
Name
AMAN
CHRISTINA
SHEM
c) Switch
(b)
Aggregate functions :
It operates on multiple rows
It displays one result for set of rows
It can be used only in select clause
Examples: min, max, avg, sum etc.
2|Page
iii. Yes. The Information Technology Act, 2000 (also known as ITA-2000, or
the IT Act) is the primary law in India dealing with cybercrime and
electronic commerce.
(1 mark for each correct answer)
OR
Cybercrime or computer- oriented crime is a crime that includes a computer
and a network.
The computer may have been used in the execution of a crime or it may be
the target.
It is the use of a computer as a weapon for committing crimes such as
committing fraud, identity theft or breaching privacy.
It especially through the Internet, has grown in importance as the computer
has become central to every field like commerce, entertainment and
government.
To Display the average price of each type of vehicle having quantity more than
20. We need to group the records based on the type and then find average
price using avg() function.
3|Page
select avg(price),type from vehicle group by type having qty>20;
(1mark for correct significance & 2 mark for correct example
i. select mid(INFORMATICS PRACTICES',7,7);
ii. select INSTR('WELCOME WORLD','COME');
iii. select round(2334.78,1);
iv. select mod(200,7);
v. select trim(userid) from users;
1 mark for each correct query
OR
4|Page
iii. (a) Since the cabling distance between buildings GANGA and JAMUNA
are quite large, so a repeater each, would ideally be needed along their
path to avoid loss of signals during the course of data flow in these
routes.
(b) In the layout a switch each would be needed in all the building, to
interconnect the group of cables from the different computers in each
building.
iv. Optical fiber
v. Video conferencing
(1 mark for the correct Answer)
import matplotlib.pyplot as plt 1+1+2
Category=['Gold','Silver','Bronze']
Medal=[20,15,18]
plt.bar(Category,Medal)
plt.ylabel('Medal')
plt.xlabel('Medal Type')
plt.title('Indian Medal tally in Olympics')
plt.show()
5|Page
ii.
School tot_students Topper Runnerup
Cyb2 GPS 20 18 2
Cyb4 MPS 18 10 8
1 mark for each correct output
B. Python statement:
print(df.loc['Cyb2': 'Cyb5', 'Topper'])
OR
print(df.Total_students-df.Runnerup)
2 marks for correct Python statement
**************************
6|Page
KENDRIYA VIDYALAYA SANGTHAN
JABALPUR REGION
FIRST PREBOARD EXAMINATION2022-23
CLASSXII
INFORMATICS PRACTICES(065)
TIME:3 HOURS M.M.70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have18 questions carrying01 mark each.
4. Section B has 07 Very Short Answer type questions carrying02 marks each.
5. Section Chas 05 Short Answer type questionscarrying03markseach.
6. Section Dhas03 LongAnswertypequestionscarrying05markseach.
7. Section E has02 questionscarrying04marks each. One internal choice is
given in Q35 against part c only.
8. All programming questions are to be answered using Python Language only.
PARTA
1. a)Internet 1
1 mark for correct answer
2. c)Plagiarism 1
1 mark for correct answer
3. d) All of these 1
1 mark for correct answer
4. c)Null value 1
1 mark for correct answer
5. b) 2.8 1
1 mark for correct answer
6. d) Property 7
1 mark for correct answer
7. d) Arithmetic Functions
1 mark for correct answer
8. a) 460 1
1 mark for correct answer
9. c)LCASE(str/column_name) 1
1 mark for correct answer
10. b) S[2] 1
1 mark for correct answer
11. c)Homogeneous tabular data structure 1
1 mark for correct answer
12. d) type 1
1 mark for correct answer
13. c)Chat group 1
1 mark for correct answer
14. d)DATE() 1
1 mark for correct answer
15. c)India’s Information Technology(IT),Act ,2000 1
1 mark for correct answer
16. a) Copyright 1
1 mark for correct answer
Q17and18areASSERTIONANDREASONING based questions. Mark the correct
choice as
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
17. i) Both A and R are true and R is the correct explanation for A 1
18. i) Both A and R are true and R is the correct explanation for A 1
.
PARTB
19 Website: A group of related webpages that follow the same theme and 2
are connected together with hyperlinks is called a Website.
Webpage: web page is an electronic document designed using HTML.it
displays information in textual or graphical form.
Need of Networking:
i. Resource sharing
ii. Reliability
iii. Cost effective
iv. Fast data sharing
½ mark for each (any two)
20 SELECT Deptcode,MAX(Salary) FROM Employee GROUP BY Deptcode; 2
24. 2 8 2
4 7
1 mark for each correct answer
25. i) 3 columns 2
ii)import pandas as pd
1 mark for each correct answer
SECTIONC
29 i. Cyber stalking 3
ii. He should bring to the notice of his parents and school authorities.
iii.Computer ethics
OR 3
Ans. Plagiarism is the act of using or stealing someone else’s intellectual work,
ideas etc. and passing it as your own work. In other words, plagiarism is a
failure in giving credit to its source.
Plagiarism is a fraud and violation of Intellectual Property Rights. Since IPR
holds a legal entity status, violating its owners right is a legally punishable
offence.
Any two ways to avoid plagiarism:
Be original
Cite/acknowledge the source
1 mark for correct definition
1 mark for correct justification
½ mark each for any two ways to avoid plagiarism
30 ANS: 3
(i) SELECT Sname, ROUND(Bonus,0)FROM Salesman;
(ii) SELECT MONTHNAME(DOJ) FROM Salesman;
(iii) SELECT MIN(SALARY) FROM Salesman;
1 mark for each correct query
OR
The GROUP BY clause can be used to combine all those records that have identical
value in a particular field or a group of fields. Whereas, ORDER BY clause is used
to display the records either in ascending or descending order based on a particular
field. For ascending order ASC is used and for descending order, DESC is used. The
default order is ascending order.
1 mark for correct significance 2 marks for correct example
SECTIOND
31. 5
i. select mid('INDIA SHINING',7,7);
ii. select INSTR('WELCOME WORLD','COME');
iii. select round(78.779,2);
iv. select mod(149,6);
v. select trim(userid) from users;
Finance Block
The above layout is based on minimum cable length required which is 120 meter in
the above case.
iii) Switch
iv)WAN
v) Satellite Link
33 import matplotlib.pyplot as plt
Games=["Subway Surfer","TempleRun","CandyCrush","BottleShot","RunnerBest"]
Rating=[4.2,4.8,5.0,3.8,4.1]
plt. bar(Games,Rating)
plt.xlabel("Games")
plt.ylabel("Rating”)
plt. show()
½ mark for each correct statement
Python statement to save the chart:
plt.savefig("aa.jpg")
1 mark for the correct statement
OR
import matplotlib.pyplot as plt
Year=[2015,2016,2017,2018]
Pass_Percentage=[82,83,85,90]
plt. plot(Year,Pass_Percentage)
plt.xlabel("Year")
plt.ylabel("Pass_Percentage”)
plt. show()
SECTIONE
34 1+1+2
i. SELECT UPPER(PNAME) FROM STOCK;
ii. SELECT* FEOM STOCK ORDER BY PRICE DESC;
OR
SELECT CATEGORY,SUM(QTY) FROM STOCK GROUP BY CATEGORY;
2 marks for correct query
35. A)
i) 2 2012 Jan 35 1+1+2
3 2010 Dec 55
4 2012 Dec 65
ii) 55
65
1 mark for each correct output
B )Python statement:
print(df.loc[1: 3, 'year'])
OR
df.rename(columns={‘Month’:’mon_name’)
Syllabus
▪ Unit I:
❖ Introduction to computer and computing: evolution of computing devices, components of a
computer system and their interconnections, Input/output devices.
❖ Computer Memory: Units of memory, types of memory – primary and secondary, data deletion,
its recovery and related security concerns.
❖ Software: purpose and types – system and application software, generic and specific purpose
software.
▪ Unit II:
❖ Basics of Python programming, Python interpreter - interactive and script mode, the structure
of a program, indentation, identifiers, keywords, constants, variables, types of operators,
precedence of operators, data types, mutable and immutable data types, statements,
expressions, evaluation and comments, input and output statements, data type conversion,
debugging.
❖ Control Statements: if-else, for loop
❖ Lists: list operations - creating, initializing, traversing and manipulating lists, list methods and
built-in functions.
❖ Dictionary: concept of key-value pair, creating, initializing, traversing, updating and deleting
elements, dictionary methods and built-in functions.
KENDRIYA VIDYALAYA SANGATHAN, JAIPUR REGION
HALF-YEARLY
CLASS XI (SESSION: 2022-23)
SUBJECT: INFORMATICS PRACTICES (065)
Time: 3 Hours Max. Marks: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A have 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each.
8. Internal choices have been given in question number 19, 23, 29, 30, 32, 33, 34 and 35.
9. Internal choices given in question number 34 and 35 is for part (b) only.
Q.
Question Marks
N.
Section - A
Who is referred to as "father of computing."?
01 a. Tim Berners-Lee b. Alan Turing 1
c. Charles Babbage d. Mark Zuckerberg
Vacuum Tubes belongs to which generation of computers?
02 a. First b. Second 1
c. Third d. None of these
Which of the following is not the part of a Processor?
03 a. Arithmetic Logic Unit b. Cache 1
c. Control Unit d. None of these
____________ is not an example of secondary memory.
04 a. Solid state drive b. Digital Versatile Disk (DVD) 1
c. RAM d. Floppy Disk
Which is the correct arrangement of the memory devices in ascending order
of their speed?
05 1
a. HDD, RAM, Cache, Register b. Register, Cache, RAM, HDD
c. Cache, RAM, HDD, Register d. RAM, HDD, Cache, Register
Collection of 4 bits is called ___________.
06 a. Bit b. Kilo byte 1
c. Byte d. Nibble
______________ is the smallest unit of memory?
07 a. Bit b. Nibble 1
c. Byte d. Kilo byte
A business is using software A to generate bills, then to which category this
software belongs?
08 a. System b. Application 1
c. Language Processors d. Both a and b
Antivirus belongs to which category of software?
09 a. System b. Application 1
c. Language Processors d. Utilities
________________ is not an example of Operating System?
10 a. Linux b. Windows 1
c. Adobe d. Android
Python is which type of language?
11 a. Compiler based b. Interpreter based 1
c. Assembler based d. None of these
Smallest unit of python programming language is called?
12 a. Literal b. Token 1
c. Identifier d. Operator
Which of the following is not an example of control statements?
13 a. int b. for 1
c. if d. while
Which statement is used to terminate the loop abruptly?
14 a. continue b. kill 1
c. break d. None of these
Which of the following commands will create a list?
15 a. list1 = list() b. list1 = [] 1
c. list1 = list([True, False, True]) d. All the mentioned
Which of the following statements create a dictionary?
16 a. my_dict = {} b. my_dict = {“a”:1: “b”:2} 1
c. my_dict = {1:“a”, 2:“b”} d. both a & c
Q17 and Q18 are ASSERTION AND REASONING based questions. Mark the correct choice as
a. Both A and R are true and R is the correct explanation for A
b. Both A and R are true and R is not the correct explanation for A
c. A is True but R is False
d. A is False but R is True
Assertion (A): The output of len(my_list) statement is 3 when, my_list = [‘K’, ’V’,
’S’].
17 1
Reasoning (R): len() function on list returns the no. of items present in that
list.
OR
Write python code to depict the data of India/England semi final runs by over on
line chart. The data as following:
Overs 5 10 15
India 31 62 100
England 52 98 156
i) Display the overs as same as given here on x-axis.
ii) Apply the line colours as – India : Blue, England: Red
iii) Apply appropriate labels
iv) Apply chart label – T20W Cup 2022 : Semi-final 2
Ans.:
import matplotlib.pyplot as plt
overs=[5,10,15]
ind=[31,62,100]
eng=[52,98,156]
plt.plot(overs,ind,'b')
plt.plot(overs,eng,'r')
plt.xlabel("Overs")
plt.xticks(overs)
plt.ylabel("Runs")
plt.show()
Downloaded from www.tutorialaicsip.com
Section – E
34. Consider the below given table – SuperArcade:
SNo AgencyName Owner Opening_Date Rent FLR
1 Gujarat Gas Gujarat Gas 2021-01-01 35000 I
2 Padhai Classes Ankur Patel 2018-04-01 32000 II
3 Ram Enterprise Ram Patel 2018-06-15 38000 I
4 SP InfoTech Siraj Patel 2020-05-17 28000 II
5 Gallops Niraj Desai 2018-05-20 48000 III
6 GK Classes Geet Kapoor 2019-08-15 34000 I
7 Nishtha Couriers Nishtha Patel 2020-11-04 22000 G
Krunal joined as DBA and written following partial queries, complete the queries and
help him: (1 + 1 + 2)
a) Select _________, _________ from superarcade; (Maximum & Minimum Rent)
Ans.: max(rent), min(rent)
b) Select __________ from superarcade; (owner name into capital)
Ans.: ucase(owner)
c) Select FLR, avg(rent) from superarcade _________ having ______>=2;
(Floor wise average rent where shops are more than 2)
Ans.: group by, count(agencyname)
OR
Select AgencyName, Owner from superarcade ____________ opening_date
___________ (Display the shops as per by history (Latest to Oldest)).
Ans.: order by, desc
35. Consider the following dataframe:
AppName Category Rating Installs
Coloring Book Barbaie Entertainment 3.8 646456
Pocket Bowling 3D Sports 3.6 334144
Smart File Manager Productivity 4.4 3741253
Photo Collage Photography 3.6 2534748
-------------X-----------------
Thank You