You are on page 1of 6

Section – A

(Choose the correct option)


1. The default separator character of print() is _______.
(a) tab (b)sep (c) space (d) new line
2. _______ are tokens that trigger some computation.
(a) keywords (b) operators (c) expressions (d) punctuators
3. The _______ operator test if a given value is in a sequence or not.
(a) is (b) if (c) for (d) in
4. Which of the following will create an empty list?
(a) L=[0] (b) L=list(0) (c) L=list() (d) L=List(empty)
5. When data of one file cannot be mapped to other relation file, it is called data ________.
(a) Dependence (b) Redundancy (c) Inconsistency (d) Isolation
6. ______ is the repository of metadata.
(a)Constraint (b) Data Dictionary (c)Query (d) All of these
7. Pool of values from where a column draws its value is called _______.
(a) table (b)attribute (c)dataset (d) domain
8. It defines the structures of database components.
(a)SQL (b) DDL (c) DML (d) TCL
9. Which of the following keyword will you use in the following query to display all the values of
the column dept_name?
Select ________ dept_name from Company;
(a) unique (b) distinct (c) all (d) each
10. Consider following SQL statement. What type of statement is this?
insert into instructor values(10211,’Shreya’,’Biology’,66000) ;
(a)Procedure (b) DML (c)DDL (d) TCL
11. An attribute in a relation is a foreign key if it is the _____ key in any other relation.
(a)Candidate (b) super (c) primary (d) child
12. Which operator performs pattern matching?
(a) between (b) alter (c)like (d) is
13. The _______ is a network of devices that have an embedded hardware and software to
communicate with other devices on the same network.
(a) Internet of Things (b) communication network (c)Model (d) None of these
14. Which of the following is not a cloud service?
(a) IaaS (b) DaaS (c)PaaS (d) SaaS
15. The most popular application of blockchain technology is ________.
(a) Digital Currency (b) GIMP (c)Open Office (d) None of these
16. Spell checking features are example of ________.
(a) Data Science (b) Neuro Science (c) NLP (d) All of these
Assertion and Reason based questions:
17. Assertion(A): The term bug referred to as an error, a flaw or fault in a computer program
that causes an incorrect or unexpected result.
Reason(R): Debugging is the process of finding and resolving the errors to produce the
desired result. It may happen that the program is running successfully but not producing the
expected result.
Based on the above assertion and reasoning. Choose an appropriate statement from the
options given below:
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true

18. Assertion(A): Machine Learning requires good quality and sufficient data to train and test
the algorithm.
Reason(R): For correct classification, good quality data which is free from noise and
sufficient data is required for training and testing of the algorithm.
Based on the above assertion and reasoning. Choose an appropriate statement from the
options given below:
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true
Section – B

19. What will be the output of the following code:


A=3-4+(10/2)
B=5*6
C=7.0/2.0
D=[’hmm’] * 4
print(“value are :”A,B,C,D)
OR
What will be the output of following Python statements:
print(len(“Hello”)==25/5 or 20/10)
print(3 < 5 or 50/(5-(3+2)))
20.Explain the programming construct ‘selection’ with the help of an example.
21. What is empty statement in Python? What is its need?
22. Differentiate between sort() and sorted() functions in List?
23. Differentiate between DDL and DML.
OR
What is the use of SQL in MySQL?
24. How foreign key command is different from primary key command?
25.What are the two common types of grids? Explain any one of it.

Section – C
26. Write a program to input N numbers and then print the second largest number.

27. Define Database. List any four advantages of Database.

28.Consider the given table and write the commands for the following:
Table Name: Movie
Movie_Id Movie_name Category releaseDate Director
M0001 Gandhi Godse History 2023-01-26 Rajkumar Santoshi
M0002 Faraaz Action 2023-02-03 Hansal Mehta
M0003 Shehzada Drama 2023-02-10 Rohit Dhawan
M0004 Bawaal Null 2023-04-07 Nitesh Tiwari

i) To add movie_id as primary key.


ii) To change the size of category column to 50 characters.
iii) To delete column releasedate

29.Give the database terms used for the following:


i) Collection of logically related records.
ii) A special value that can be used to hold unknown values.
iii) A field which can identify distinct records.
OR
Given a statement as follows:
CREATE TABLE Orders
(O_Id int NOT NULL,
OrderNo int NOT NULL,
P_Id int,
PRIMARY KEY (O_Id),
FOREIGN KEY (P_Id) REFERENCES Persons(P_Id));

Identify the constraints in the above statement and list them out as the column constraints
and table constraints.
30. Differentiate between Augmented Reality and Virtual Reality.
Section-D
31. The record of a student (Name, RollNo, Marks in five subjects and percentage of marks) is
stored in the following list as given:
L1=[‘Jatin’,’H-40’,[56,98,99,72,69],75.5]
Write Python statements to retrieve the following information from the list L1.
1. Display percentage of the student
2. Marks in the fifth subject
3. Maximum marks of the student
4. Roll no of the student
5. Change the name of the student from ‘Jatin’ to ‘Raghu’.
OR
Given a list L=[13,14,15,112,125.7,[12,11,10,15],188], Write a statement to get the
following output from the given list:
1.To print [14,112,[12,11,10,15]]
2.To print [13,15,125.7,188]
3.To print [14,125.7]
4.To print [12,11,10,15]
5. To print [188,125.7,15,13]

32. Consider the following dictionary:


dict3 = {'Mohan':95,'Ram':89,'Suhel':92,'Sangeeta':85}
Write the output for the following commands:
i) print(dict3['Ram'])
ii) print( len(dict3))
iii) print( dict3.items())
iv) print(dict3.get('Sohan'))
v) del dict3['Mohan’']
print(dict1)
33.Consider the below given table and write queries for (i) to (v):
Table Name: Pet
Name Owner Species Gender Age
Monty Aditya Dog M 4
Badal Dev Horse M 4
Moti Motisingh Dog M 3
Mittu Harsh Parrot M 2
Pinky Kartavya Cat F 1
Sweety Vyas Cat F 2
i) Display all the details of pets in alphabetical order of names.
ii) Display Name, owner and age of all pets whose age is 2 to 4 years.
iii) Increase the age of all pets by 1 year.
iv) Delete all details of female pets.
v) Insert a new record: (‘Rosy’,’Rajveer’,’Dog’,’F’,2)
OR
Write the output of the following queries based on the above Pet table:
i) select name, owner from pet where owner name like ‘%a’;
ii) select name, age from pet where species=’dog’ and age between 1 and 3;
iii) select * from pets where species in (‘horse’, ’parrot’);
iv) select name, owner, species from pets where gender =’M’ or gender = ‘F’;
v) select name, age from pet where age>4;
Section-E
34. Given below is a dictionary:
dct={1:50, ”Name”:”Sumit”, 2:(4,5), (1,3):”Tuple”, 3:[7,9]}
With reference to the above dictionary, write a statement/ function to perform the
following tasks:
(i) To access the value of a key “Name”.
(ii) To access all the key-value pairs of the dictionary.
(iii) To insert a new key-value pair as “Salary” 2500.
OR
To update the value of key 1 with 100.
(iv) To delete a key-value pair (2: (4,5)).

35.Your school management has decided to organize cricket matches between students of
Classes XI and XII. All the students are divided into four teams—Team Rockstars,
Team BigGamers, Team Magnet and Team Current. During the summer vacations,
various matches are to be held between these teams. Help your sports teacher do the
following:
(a) Create a database “Sports”.
(b) Create a table “TEAM” with the following considerations:
(i) It should have a column TeamID for storing an integer value between 1 and 9, which
refers to unique identification of a team.
(ii) Each TeamID should have its associated name (TeamName), which should be a string of
length not less than 10 characters.
(iii) Give the statement to make TeamID as the primary key.
(c) Show the structure of the table TEAM using SQL command.
(d) As per the preferences of the students, four teams were formed as given below.
Insert these four rows in TEAM table:
Row 1: (1, Team Rockstars)
Row 2: (2, Team BigGamers)
Row 3: (3, Team Magnet)
Row 4: (4, Team Current)
Or
(d) Add a new column ‘Position’ with appropriate datatype and constraint considering that
no values should be repeated in that column.

You might also like