Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
🏆 Revision & Practice  ·  Lesson 20

Important Questions & Viva

Multiple choice questions

  1. Which unit of the CPU controls the flow of data?

    (a) ALU   (b) Control Unit   (c) Register   (d) Cache  

    Show answer

    (b) Control Unit

  2. Which of these is system software?

    (a) MS Excel   (b) Tally   (c) Linux   (d) Chrome  

    Show answer

    (c) Linux

  3. Gmail is an example of

    (a) IaaS   (b) PaaS   (c) SaaS   (d) Grid computing  

    Show answer

    (c) SaaS

  4. Which is NOT one of the Vs of big data?

    (a) Volume   (b) Velocity   (c) Variety   (d) Visibility  

    Show answer

    (d) Visibility

  5. Output of print(type(3 + 2.0))

    (a) <class 'int'>   (b) <class 'float'>   (c) <class 'str'>   (d) Error  

    Show answer

    (b) <class 'float'>

  6. Output of print('ab' * 3)

    (a) ababab   (b) ab3   (c) Error   (d) aabbab  

    Show answer

    (a) ababab

  7. Which method adds an element at the end of a list?

    (a) insert()   (b) add()   (c) append()   (d) push()  

    Show answer

    (c) append()

  8. d.get("x", 0) returns 0 when

    (a) x is 0   (b) x is missing   (c) d is empty only   (d) never  

    Show answer

    (b) x is missing

  9. np.arange(2, 11, 3) gives

    (a) [2 5 8]   (b) [2 5 8 11]   (c) [3 6 9]   (d) [2 4 6 8 10]  

    Show answer

    (a) [2 5 8]

  10. Shape of np.zeros((3, 4))

    (a) (4, 3)   (b) (3, 4)   (c) 12   (d) (3,)  

    Show answer

    (b) (3, 4)

  11. The median of 4, 9, 2, 7, 5 is

    (a) 5   (b) 7   (c) 5.4   (d) 4  

    Show answer

    (a) 5

  12. Number of rows in a relation is called its

    (a) degree   (b) domain   (c) cardinality   (d) schema  

    Show answer

    (c) cardinality

  13. Which constraint does not allow duplicate values but allows NULL?

    (a) PRIMARY KEY   (b) UNIQUE   (c) NOT NULL   (d) DEFAULT  

    Show answer

    (b) UNIQUE

  14. Which command changes the structure of a table?

    (a) UPDATE   (b) ALTER   (c) INSERT   (d) SELECT  

    Show answer

    (b) ALTER

  15. Which pattern matches names that end with 'a'?

    (a) 'a%'   (b) '%a'   (c) '_a'   (d) '%a%'  

    Show answer

    (b) '%a'

  16. DELETE is a ___ command.

    (a) DDL   (b) DML   (c) DCL   (d) TCL  

    Show answer

    (b) DML

Find the output

Q1

Python
x = 7
y = x // 2 + x % 3 * 2
print(x, y)
Show answer
Output
7 5

Q2

Python
L = [10, 20, 30, 40]
L.insert(1, 15)
L.extend([50])
print(L[::2], L.pop(), len(L))
Show answer
Output
[10, 20, 40] 50 5

Q3

Python
d = {'a': 3, 'b': 5}
d['c'] = d['a'] * d['b']
for k in d:
    print(k, d[k], end='; ')
print()
Show answer
Output
a 3; b 5; c 15;

Q4

Python
import numpy as np
a = np.array([[2, 4], [6, 8]])
print(a * 2)
print(a.sum(axis=0), a.mean())
Show answer
Output
[[ 4  8]
 [12 16]]
[ 8 12] 5.0

Q5

Python
import numpy as np
b = np.arange(10)
print(b[b % 3 == 0], b[2:8:2], b.reshape(2, 5)[1])
Show answer
Output
[0 3 6 9] [2 4 6] [5 6 7 8 9]

Q6

Python
for i in range(1, 4):
    print('*' * i + '-' * (3 - i))
Show answer
Output
*--
**-
***

Short answer & SQL questions

  1. Differentiate between RAM and ROM.

    Show answer

    RAM is volatile, read-write memory holding running programs and data. ROM is non-volatile, mostly read-only memory holding the start-up firmware (BIOS).

  2. What is the difference between a list and a NumPy array?

    Show answer

    A list can store mixed data types and arithmetic operators do not work element-wise. A NumPy array stores one data type, uses less memory, is faster and supports element-wise operations such as arr * 2.

  3. Explain primary key, candidate key and foreign key with an example.

    Show answer

    In STUDENT(RollNo, Name, AadhaarNo), RollNo and AadhaarNo can both identify a student — candidate keys. RollNo is chosen as the primary key; AadhaarNo becomes an alternate key. In FEE(ReceiptNo, RollNo, Amount), RollNo refers to STUDENT and is a foreign key.

  4. Differentiate between DELETE and DROP.

    Show answer

    DELETE (DML) removes rows from a table; the table structure remains. DROP (DDL) removes the whole table including its structure and data.

  5. Find mean, median, mode and range of 12, 7, 9, 7, 15.

    Show answer

    Sorted: 7, 7, 9, 12, 15. Mean = 50 ÷ 5 = 10; median = 9; mode = 7; range = 15 − 7 = 8.

  6. What are IaaS, PaaS and SaaS? Give one example each.

    Show answer

    IaaS provides virtual hardware (AWS EC2); PaaS provides a platform to build apps (Google App Engine); SaaS provides ready software over the internet (Gmail, Google Docs).

  7. Write SQL to show names and marks of students of XI-B with marks above 70, highest first.

    Show answer

    SELECT Name, Marks FROM STUDENT WHERE Class = 'XI-B' AND Marks > 70 ORDER BY Marks DESC;

  8. Write SQL to add a column Phone to STUDENT and then set it for RollNo 101.

    Show answer

    ALTER TABLE STUDENT ADD Phone CHAR(10); UPDATE STUDENT SET Phone = '9876543210' WHERE RollNo = 101;

Viva questions

QuestionAnswer
Full form of NumPy?Numerical Python.
What does ndim tell?Number of dimensions of an array.
Function to create evenly spaced numbers including the end value?np.linspace().
Why is input() converted with int()?Because input() returns a string.
Which Python data type stores key-value pairs?Dictionary.
What is a DBMS?Software to create and manage databases, e.g. MySQL.
Command to see the structure of a table?DESCRIBE table_name;
What is NULL?An unknown or missing value — not zero or blank.
Difference between CHAR and VARCHAR?CHAR is fixed length; VARCHAR is variable length.
Give two sensors in a smartphone.Accelerometer, proximity sensor (also GPS, gyroscope).

Frequently Asked Questions

Which chapters carry the most marks in Class 11 IP?
Python programming and database/SQL together usually carry the largest share. Check the latest CBSE sample paper and syllabus for exact weightage.
← Class 11 Informatics Practices
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

Course complete! Continue withClass 12 Informatics Practices Your progress: 20 / 20 (100%) · Recommended next course Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free