/**/ Python & MySQL: March 2023

Friday, March 17, 2023

INFORMATICS PRACTICES (C-11) 2022-23

 CLASS - XI

INFORMATICS PRACTICES (065)

SAMPLE QUESTION PAPER (2022 – 23)

Max Marks: 70                                                                                                                                                                                  Time: 3 Hrs.

General Instructions:

  1. This question paper contains 3 parts A, B and C . Each part is compulsory.
  2. Section A contains 25 questions 1 mark each.
  3. Section B contains 10 questions 2 mark each.
  4. Section C contains 5 questions 5 mark each.

SECTION - A

1

Python use a/an _______ to convert source code to object code.

a. Interpreter

b. Compiler

c. Combination of Interpreter and compiler

d. Special virtual engine

Ans

(a) Interpreter

2

Fill in the blanks:

__________ refers to the ability of a machine or a computer program to think, learn and evolve.

  1. Big Data
  2. Grid Computing
  3. Artificial Intelligence
  4. Blockchain Technology

 

Ans

Artificial Intelligence

3

Which of the following is not a component of SQL?

a.       DDL

b.      DML

c.       TCL

d.      ADL

 

Ans

ADL

4

Number of attributes in a relation is called ___________.

  1. Size
  2. degree
  3. cardinality
  4. weight

Ans

degree

5

________ technology makes users feel as if they truly are in a virtual environment.

a.       NLP

b.      AR

c.       VR

d.      ML

 

Ans

VR

6

Intelligent sensors that can convert and process quantities digital are __________ sensors.

a.  Cloud

b. AI

c. Grid

d. Smart

 

Ans

AI

7

Which of the following is not a cloud service?

a. IaaS

b. PaaS

c. SaaS

d. DaaS

Ans

DaaS

8

Extremely large sets of data are________.

a. database

b. big data

c. cloud computers

d. None of these

Ans

Big data

9

Which of these is an example of cloud storage?

  1. Google Drive
  2. Microsoft Azure
  3. iCloud
  4. All of these

Ans

All of these

10

Data items having fixed value are called_______.

  1. Identifiers
  2. Functions
  3. Keywords
  4. Literals

Ans

(d) Literals

11

Which of the following attributes can be considered as a choice for primary key?

  1. Name
  2. Street
  3. Roll No
  4. Subject

 

Ans

Roll No

 

12

What does DDL stand for?

  1. Dynamic Data Language
  2. Detailed Data Language
  3. Data Definition Language
  4. Data Derivation Language

Ans

Data Definition Language

 

13

What will the following code produce?

a=8.6

b=2

print( a / / 2 )

 

(a) 4.3

(b) 4.0

(c) 4

(d) Compilation error

 

Ans

(b) 4.0

14

A file based system is also called

a. flat file

b. serial file

c. float database

d. unrelational file

 

Ans

Flat file

15

Which amongst the following is not an example of browser?

  1. Firefo
  2. Avast
  3. Edge
  4. Chrome

Ans

Avast

16

SQL stands for _________

 

Ans

Structured Query Language

17

To remove duplicate rows from the result of a query, specify the SQL qualifier _______ in select list.

 

Ans

DISTINCT

18

A data _________ is a set of rules that define valid data.

a. Constraint

b. Data Dictionary

c. Query

d. All of these

 

Ans

Constraint

19

Function range(3) is equivalent to:

(a) [0, 1, 2]

(b) [0, 1, 2, 3]

(c) [1, 2, 3]

(d) [0, 2]

 

Ans

(a) [0, 1, 2]

20

The term ________ is used to refer to a row.

a. Attribute

b. Tuple

c. Field

d. Instance

 

Ans

Tuple

 

21

What is the purpose of the SQL AS clause?

a. The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column

b. The AS clause is used with the JOIN clause only

c. The AS clause defines a search condition

d. All of the mentioned.

Ans

(a)

22

Which of the following is a legal expression in SQL?

a. SELECT NULL FROM SALES ;

b. SELECT NAME FROM SALES ;

c. SELECT * FROM SALES WHEN PRICE = NULL ;

d. SELECT # FROM SALES ;

Ans

b. SELECT NAME FROM SALES ;

23.

The COUNT function in sql returns the number of ________

a. Value

b. Distinct Values

c. Group By

d. Columns

Ans

a. Value

24.

To obtain all columns, use a(n) …………………… instead of listing all the column names in the select list.

a. &

b. Dollar ($)

c. Hash (#)

d. Asterisk (*)

Ans

d. Asterisk (*)

25.

Write the output of the following SQL command:

SELECT ROUND(49.88) ;

a. 49.88

b. 49.8

c. 49.0

d. 50

Ans

d. 50

26

What will be the output of following code?

 

mysql> SELECT CONCAT (CONCAT (‘Inform’, ‘atics’), ‘Practices’) ;

 

Ans

Informatics Practices

27

Write commands to display the system date.

 

Ans

SELECT CURDATE() ;

28

What is the output produced when this code executes?

a=0

for i in range(4, 8) :

          if i%2:

                a=a+i

print(a)

 

Ans

12

29

Deepika wants to remove all rows from the table BANK. But she needs to maintain the structure of the table. Which command is used to implement the same?

 

Ans

DELETE FROM BANK ;

 

30

Create table ‘Employee’ with the following structure:

 

Name of column

ID

First_Name

Last_Name

User_ID

Salary

Type

Integer

Varchar(30)

Varchar(30)

Varchar(10)

Float

 

 

Ans

Create table employee(ID int(5), First_Name varchar(30), Last_Name varchar(30), User_ID varchar(10), Salary float);

 

 

31

Write a program to print the table of a given number. The number has to enter by the user.

Ans

n=int(input(‘Enter number:’))

for i in range(1, 11):

       print(n, ‘x’, ‘i', ‘=’, (n*i))

32

Program to obtain three number and print their sum.

Ans

a = int(input("Enter first number:"))

b = int(input("Enter Second number:"))

c = int(input("Enter Third number:"))

sum = a + b + c

print("Three numbers are: ", a, b, c)

print("Sum is :", sum)

 

33

Differentiate between CHAR and VARCHAR?

Ans

 The difference b/w CHAR and VARCHAR is that of fixed length and variable length. The CHAR datatype specifies a fixed length character string. When a column is given datatype as CHAR(n), then MySQL ensures that all values stored in that column have this length i.e., n bytes. If a value is shorter than this length n then blanks are added, but the size of value remains n bytes.

VARCHAR, on the other hand, specifies a variable length string. When a column is given datatype as VARCHAR(n), then the maximum size a value in this column can have is n bytes. Each value that is stored in this column stores exactly as you specify it i.e., no blank are added if the length is shorter than maximum length n. However, if you exceed the maximum length n, then an error message is displayed.

34

Define Data types. What are the main objectives of datatypes?

Ans

Data types is defined as a set of values along with the operations that can be performed on those values. Some common data types are : Integer, float, varchar, char, string etc.

Main objectives of data types are:

·         Optimum usage of storage space.

·         Represent all possible values.

·         Improve data integrity.

 

35

What is foreign key?

Ans

A foreign key is a column or group of columns in a relational database table that provides a link between data in two tables.

36

Program to print elements of a list [‘q’, ‘w’, ‘e’, ‘r’, ‘t’, ‘y’] in separate lines along with element’s both indexes (positive and negative).

 

Ans

 L =  [‘q’, ‘w’, ‘e’, ‘r’, ‘t’, ‘y’]

length = leng(L)

for a in range(length):

     print("At indexes", a,  "and", (a-length), "element:", L[a])

37

Table “Order” is shown below. Write commands in SQL for (i) to (iv) and output for (v).

Table: Orders

ORDERID

ORDERDATE

SALESPERSON

ORDERAMOUNT

O101

2015-09-12

Ravi Kumar

34000

O102

2015—08-15

Rashmi Arora

50000

O103

2015-11-01

Ravi Kumar

55000

O104

2015-12-09

Manjeet Singh

60000

O105

2015-11-10

Rashmi Arora

50000

 

Solve the following queries:

        i.To display names of SalesPersons (without duplicates)

        ii. To list orderedID and respective OrderAmont in descending order of OrderAmount.

        iii. To count the number of orders booked by SalesPerson with names starting with ‘R’.

         iv.   To list order ids, order dates and order amounts that were booked after 1st September 2015.

        v.  SELECT ORDERID, ORDERAMOUNT FROM ORDER WHERE ORDERAMOUNT BETWEEN 50000 to 70000.             

Ans

 Check blog MySQL questions


38

Consider the following table ‘GAMES’.

Table : GAMES

GCode

GameName

Type

Number

PrizeMoney

ScheduleDate

101

Carrom Board

Indoor

2

5000

23-Jan-2004

102

Badminton

Outdoor

2

12000

12-Dec-2003

103

Table Tennis

Indoor

4

8000

14-Feb-2004

105

Chess

Indoor

2

9000

01-Jan-2004

108

Lawn Tennis

Outdoor

4

25000

10-Mar-2004

 

Write SQL commands to:

  1. To display the name of all GAMES with their GCodes.
  2. To display the content of the GAMES table in ascending order of ScheduleDate.
  3. To display sum of PrizeMoney for each type of GAMES.

 

Ans

  1. SELECT GAMENAME, GCODE FROM GAMES ;
  2. SELECT *  FROM GAMES ORDER BY SCHEDULEDATE ;
  3. SELECT SUM(PRIZEMONEY), TYPE FROM GAMES GROUP BY TYPE ;

 

39

What is cloud computing? Explain.

Ans

Cloud computing describes the act of storing managing and processing data online, as opposed to on a physical computer or network. In other words, cloud computing is the delivery of computing services such as servers, storage, database, networking, software, analytics etc. over the Internet. 

40

Write a program to create a phone dictionary for all your friends and print each key value pair in separate lines.

Ans:

PhoneDict = {"Manav" : 548545, "Sumit" : 745856, 

                  "Dipendra" : 548545, "Ravi" : 549584 }

for name in PhoneDict :

     print(name, " : ", PhoneDict[name])


CLASS XI HALF YEARLY QP WTH MS 2024

  Half Yearly Examination: 2024-25 Informatics Practices (065) Class- XI       Time Allowed: 3hrs                                     ...