ज़रूरी Questions और Viva
Multiple choice questions
Which unit of the CPU controls the flow of data?
(a) ALU (b) Control Unit (c) Register (d) Cache
Answer देखें
(b) Control Unit
Which of these is system software?
(a) MS Excel (b) Tally (c) Linux (d) Chrome
Answer देखें
(c) Linux
Gmail is an example of
(a) IaaS (b) PaaS (c) SaaS (d) Grid computing
Answer देखें
(c) SaaS
Which is NOT one of the Vs of big data?
(a) Volume (b) Velocity (c) Variety (d) Visibility
Answer देखें
(d) Visibility
Output of print(type(3 + 2.0))
(a) <class 'int'> (b) <class 'float'> (c) <class 'str'> (d) Error
Answer देखें
(b) <class 'float'>
Output of print('ab' * 3)
(a) ababab (b) ab3 (c) Error (d) aabbab
Answer देखें
(a) ababab
Which method adds an element at the end of a list?
(a) insert() (b) add() (c) append() (d) push()
Answer देखें
(c) append()
d.get("x", 0) returns 0 when
(a) x is 0 (b) x is missing (c) d is empty only (d) never
Answer देखें
(b) x is missing
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]
Answer देखें
(a) [2 5 8]
Shape of np.zeros((3, 4))
(a) (4, 3) (b) (3, 4) (c) 12 (d) (3,)
Answer देखें
(b) (3, 4)
The median of 4, 9, 2, 7, 5 is
(a) 5 (b) 7 (c) 5.4 (d) 4
Answer देखें
(a) 5
Number of rows in a relation is called its
(a) degree (b) domain (c) cardinality (d) schema
Answer देखें
(c) cardinality
Which constraint does not allow duplicate values but allows NULL?
(a) PRIMARY KEY (b) UNIQUE (c) NOT NULL (d) DEFAULT
Answer देखें
(b) UNIQUE
Which command changes the structure of a table?
(a) UPDATE (b) ALTER (c) INSERT (d) SELECT
Answer देखें
(b) ALTER
Which pattern matches names that end with 'a'?
(a) 'a%' (b) '%a' (c) '_a' (d) '%a%'
Answer देखें
(b) '%a'
DELETE is a ___ command.
(a) DDL (b) DML (c) DCL (d) TCL
Answer देखें
(b) DML
Output बताइए
Q1
x = 7 y = x // 2 + x % 3 * 2 print(x, y)
Answer देखें
7 5
Q2
L = [10, 20, 30, 40] L.insert(1, 15) L.extend([50]) print(L[::2], L.pop(), len(L))
Answer देखें
[10, 20, 40] 50 5
Q3
d = {'a': 3, 'b': 5}
d['c'] = d['a'] * d['b']
for k in d:
print(k, d[k], end='; ')
print()Answer देखें
a 3; b 5; c 15;
Q4
import numpy as np a = np.array([[2, 4], [6, 8]]) print(a * 2) print(a.sum(axis=0), a.mean())
Answer देखें
[[ 4 8] [12 16]] [ 8 12] 5.0
Q5
import numpy as np b = np.arange(10) print(b[b % 3 == 0], b[2:8:2], b.reshape(2, 5)[1])
Answer देखें
[0 3 6 9] [2 4 6] [5 6 7 8 9]
Q6
for i in range(1, 4):
print('*' * i + '-' * (3 - i))Answer देखें
*-- **- ***
Short answer और SQL questions
RAM और ROM में अंतर बताइए।
Answer देखें
RAM volatile, read-write memory है जो चल रहे programs और data रखती है। ROM non-volatile, ज़्यादातर read-only memory है जो start-up firmware (BIOS) रखती है।
List और NumPy array में क्या फ़र्क है?
Answer देखें
List mixed data types रख सकती है और arithmetic operators element-wise नहीं चलते। NumPy array एक data type रखता है, कम memory लेता है, तेज़ है और arr * 2 जैसे element-wise operations support करता है।
Example के साथ primary, candidate और foreign key समझाइए।
Answer देखें
STUDENT(RollNo, Name, AadhaarNo) में RollNo और AadhaarNo दोनों student को पहचान सकते हैं — candidate keys। RollNo primary key चुनी गई; AadhaarNo alternate key बनी। FEE(ReceiptNo, RollNo, Amount) में RollNo STUDENT को refer करती है, यह foreign key है।
DELETE और DROP में अंतर बताइए।
Answer देखें
DELETE (DML) table से rows हटाता है; ढाँचा बना रहता है। DROP (DDL) पूरी table — ढाँचा और data — हटा देता है।
12, 7, 9, 7, 15 का mean, median, mode और range निकालें।
Answer देखें
Sorted: 7, 7, 9, 12, 15। Mean = 50 ÷ 5 = 10; median = 9; mode = 7; range = 15 − 7 = 8।
IaaS, PaaS और SaaS क्या हैं? हर एक का example दें।
Answer देखें
IaaS virtual hardware देता है (AWS EC2); PaaS apps बनाने का platform (Google App Engine); SaaS internet पर ready software (Gmail, Google Docs)।
XI-B के 70 से ज़्यादा marks वाले students के नाम और marks, सबसे ज़्यादा पहले, दिखाने की SQL लिखें।
Answer देखें
SELECT Name, Marks FROM STUDENT WHERE Class = 'XI-B' AND Marks > 70 ORDER BY Marks DESC;
STUDENT में Phone column जोड़कर RollNo 101 के लिए set करने की SQL लिखें।
Answer देखें
ALTER TABLE STUDENT ADD Phone CHAR(10); UPDATE STUDENT SET Phone = '9876543210' WHERE RollNo = 101;
Viva questions
| प्रश्न | उत्तर |
|---|---|
| NumPy का full form? | Numerical Python. |
| ndim क्या बताता है? | Number of dimensions of an array. |
| आख़िरी value सहित बराबर दूरी वाले numbers बनाने का function? | np.linspace(). |
| input() को int() से क्यों बदलते हैं? | Because input() returns a string. |
| कौन सा Python data type key-value pairs रखता है? | Dictionary. |
| DBMS क्या है? | Software to create and manage databases, e.g. MySQL. |
| Table का ढाँचा देखने का command? | DESCRIBE table_name; |
| NULL क्या है? | An unknown or missing value — not zero or blank. |
| CHAR और VARCHAR में फ़र्क? | CHAR is fixed length; VARCHAR is variable length. |
| Smartphone के दो sensors बताइए। | Accelerometer, proximity sensor (also GPS, gyroscope). |
