COMPUTER SCIENCE 2026
कम्प्यूटर साइंस / COMPUTER SCIENCE
निर्धारित समय : 3 घण्टे / Time allowed: 3 hours
अधिकतम अंक: 70 / Maximum Marks: 70 सामान्य निर्देश :
(i) इस प्रश्न-पत्र में 37 प्रश्न हैं।
(ii) सभी प्रश्न अनिवार्य हैं। परंतु कुछ प्रश्नों में आंतरिक विकल्प दिये गये हैं। ऐसे प्रश्नों में केवल एक विकल्प को चुनिए ।
(iii) इस प्रश्न-पत्र को 5 खण्डों क, ख, ग, घ और ङ में बाँटा गया है।
(iv) खण्ड - क में 21 प्रश्न (1 से 21) हैं। प्रत्येक प्रश्न के लिये 1 अंक निर्धारित है।
(v) खण्ड - ख में 7 प्रश्न (22 से 28) हैं। प्रत्येक प्रश्न के लिये 2 अंक निर्धारित हैं।
(vi) खण्ड - ग में 3 प्रश्न (29 से 31) हैं। प्रत्येक प्रश्न के लिये 3 अंक निर्धारित हैं।
(vii) खण्ड - घ में 4 प्रश्न (32 से 35) हैं। प्रत्येक प्रश्न के लिये 4 अंक निर्धारित हैं।
(viii) खण्ड - ङ में 2 प्रश्न (36 एवं 37) हैं। प्रत्येक प्रश्न के लिये 5 अंक निर्धारित हैं।
(ix) सभी प्रोग्रामिंग प्रश्नों का उत्तर केवल Python Language में दिया जाना है।
(x) बहुविकल्पीय प्रश्नों (Multiple Choice Questions) के मामले में सही उत्तर का text भी लिखा जाना चाहिए । General Instructions:
(i) This question paper contains 37 questions.
(ii) All questions are compulsory. However, internal choices have been provided in some questions. Attempt only one of the choices in such questions.
(iii) The paper is divided into 5 Sections - A, B, C, D and E.
(iv) Section A consists of 21 questions (1 to 21). Each question carries 1 mark.
(v) Section B consists of 7 questions (22 to 28). Each question carries 2 marks.
(vi) Section C consists of 3 questions (29 to 31). Each question carries 3 marks.
(vii) Section D consists of 4 questions (32 to 35). Each question carries 4 marks.
(viii) Section E consists of 2 questions (36 & 37). Each question carries 5 marks.
(ix) All programming questions are to be answered using Python Language only.
(x) In case of MCQs, text of the correct answer should also be written. खण्ड - क / SECTION - A
(21 x 1 = 21) बतायें कि यह सही (true) है या गलत (false):
पाइथन (Python) में 74 का data type 74.0 के data type के समान होता है।
State True or False:
In Python, data type of 74 is same as the data type of 74.0. निम्नलिखित कोड स्निपिट (Code Snippet) के output को बताइए ।
Identify the output of the following code snippet :
s = "the Truth"
print(s.capitalize())
(A) The truth
(B) THE TRUTH
(C) The Truth
(D) the Truth पाइथन (Python) में निम्नलिखित में से कौन सा एक्सप्रेशन True इवैल्युएट (evaluate) होगा ?
Which of the following expressions in Python evaluates to True?
(A) 2 > 3 and 2 < 3
(B) 3 > 1 and 2
(C) 3 > 1 and 3 > 2
(D) 3 > 1 and 3 < 2 निम्नलिखित कोड स्निपिट का output क्या है ?
What is the output of the following code snippet?
s = 'War and Peace by Leo Tolstoy'
print(s.partition("by"))
(A) ('War and Peace', 'by', ' Leo Tolstoy')
(B) ['War and Peace', 'by', ' Leo Tolstoy']
(C) ('War and Peace', ' Leo Tolstoy')
(D) ['War and Peace', ' Leo Tolstoy'] निम्नलिखित statement का output क्या होगा ?
What will be the output of the following statement?
print("PythonProgram"[-1:2:-2]) निम्नलिखित कोड स्निपिट का output क्या होगा ?
What will be the output of the following code snippet?
t = tuple('tuple')
t2 = t[2],
t += t2
print(t)
(A) ('tuple')
(B) ('tuple', 'p')
(C) ('t', 'u', 'p', 'l', 'e', 'p')
(D) ('t', 'u', 'p', 'l', 'e') पाइथन में डिक्शनरी (dictionaries) के बारे में निम्नलिखित में से कौन सा कथन सही है ?
Which of the following statements is true about dictionaries in Python?
(A) डिक्शनरी एक अनुक्रम (sequence) डेटाटाइप का उदाहरण है। / A dictionary is an example of sequence datatype.
(B) एक डिक्शनरी में दो elements की एक key नहीं हो सकती । / A dictionary cannot have two elements with same key.
(C) एक डिक्शनरी में दो elements का मान (value) एक समान नहीं हो सकता । / A dictionary cannot have two elements with same value.
(D) किसी element की key और value एक नहीं हो सकते । / The key and value of an element cannot be the same. यदि L एक लिस्ट (List) है, जिसमें 6 elements हैं, तो निम्नलिखित में कौन सा कथन (statement) exception raise करेगा ?
If L is a list with 6 elements, then which of the following statements will raise an exception?
(A) L.pop(1)
(B) L.pop(6)
(C) L.insert(1, 6)
(D) L.insert(6, 1) निम्नलिखित कोड का output क्या होगा ?
What will be the output of the following code?
def f1(a, b=1):
print(a+b, end='-')
c = f1(1, 2)
print(c, sep='')
(A) 3-2
(B) 3-2
(C) 3-None
(D) 3*None- नीचे दिये गये statement पर विचार कीजिए :
Consider the statement given below :
f1 = open("pqr.dat", "____")
Read only mode में फ़ाइल खोलने के लिये निम्नलिखित में से कौन सही फ़ाइल mode है?
Which of the following is the correct file mode to open the file in read only mode?
(A) a
(B) rb
(C) r+
(D) rb+ निम्नलिखित statement सही (True) है या गलत (False), बताइए :
पाइथन (Python) में, try except finally statement का प्रयोग करके logical errors को handle किया जा सकता है।
State whether the following statement is True or False:
In Python, Logical errors can be handled using try.....except finally statement. एक table में दो candidate keys हैं, जिनमें से एक primary key के रूप में चुनी जाती है। इस table में कितनी वैकल्पिक कीज़ (alternate keys) हैं?
A table has two candidate keys, one of which is chosen as the primary key. How many alternate keys does this table have?
(A) 0
(B) 1
(C) 2
(D) 3 निम्नलिखित में से कौन सी SQL कमांड विद्यमान रिलेशन (existing relation) की डिग्री (degree) बदल सकती है ?
Which of the following SQL command can change the degree of the existing relation?
(A) DROP TABLE
(B) ALTER TABLE
(C) UPDATE...SET
(D) DELETE इस query का output क्या होगा ?
What will be the output of the query?
SELECT MACHINE_ID, MACHINE_NAME FROM INVENTORY WHERE QUANTITY <= 100;
(A) इन्वेंट्री (INVENTORY) टेबल (table) के सभी कॉलम जिनकी मात्रा (quantity) 100 से अधिक है। / All columns of INVENTORY table with quantity greater than 100
(B) इन्वेंट्री (INVENTORY) टेबल के 100 से कम मात्रा (quantity) वाली मशीनों की आई डी (ID) और नाम / ID and name of machines with quantity less than 100 from INVENTORY table
(C) इन्वेंट्री (INVENTORY) टेबल (table) के सभी कॉलम जिनकी मात्रा (quantity) 100 या 100 से अधिक है। / All columns of INVENTORY table with quantity greater than or equal to 100
(D) इन्वेंट्री (INVENTORY) टेबल के 100 से कम या इसके बराबर मात्रा वाली मशीनों की आई डी (ID) और नाम / ID and name of machines with quantity less than or equal to 100 from INVENTORY table. MySQL डेटाबेस में एक रिलेशन (relation) में 2 टपल्स (tuples) और 3 अट्रीब्यूट्स (attributes) हैं। यदि 2 Attributes को हटा (delete) दिया जाय और 4 tuples को जोड़ दिया जाय तो रिलेशन (relation) की कार्डिनलिटी (cardinality) क्या होगी ?
A relation in MySQL database consists of 2 tuples and 3 attributes. If 2 attributes are deleted and 4 tuples are added, what will be the cardinality of the relation?
(A) 4
(B) 5
(C) 6
(D) 7 SQL में, किसी सारणी (table) के कॉलम से कौन सा समुच्चय फलन (aggregate function) सबसे छोटी वैल्यू (smallest value) को रिटर्न (return) करता है ?
Which aggregate function in SQL returns the smallest value from a column in a table?
(A) MIN()
(B) MAX()
(C) SMALL()
(D) LOWER() Computer Networks के संदर्भ में, निम्नलिखित में से कौन सा RJ 45 का सही विस्तारित रूप है ?
With respect to computer networks, which of the following is the correct expanded form of RJ 45?
(A) Radio Jockey 45
(B) Registered Jockey 45
(C) Radio Jack 45
(D) Registered Jack 45 कौन सा नेटवर्क डिवाइस (Network device) नेटवर्क के आगम (entry) और निर्गम (exit) प्वाइंट (point) के रूप में कार्य करता है, क्योंकि किसी नेटवर्क में आने और उससे जाने वाले सभी डेटा (data) को सबसे पहले आवागमन मार्ग (routing paths) का प्रयोग करने के लिये इससे होकर गुजरना पड़ता है ?
Which network device serves as the entry and exit point of a network, as all data coming in or going out of a network must first pass through it in order to use routing paths?
(A) मॉडेम (Modem)
(B) गेटवे (Gateway)
(C) स्विच (Switch)
(D) रिपीटर (Repeater) XML का पूर्णरूप (full form) क्या है ?
Expand the term XML. प्रश्न सं. 20 और 21 अभिकथन (Assertion) (A) और तर्क (Reason) (R) आधारित प्रश्न हैं । सही विकल्प पर निम्नलिखित रूप में निशान लगाइये :
Q. Nos. 20 and 21 are Assertion (A) and Reason (R) based questions. Mark the correct choice as:
(A) Both Assertion (A) and Reason (R) are true and Reason (R) is the correct explanation for Assertion (A).
(B) Both Assertion (A) and Reason (R) are true and Reason (R) is not the correct explanation for Assertion (A).
(C) Assertion (A) is true, but Reason (R) is false.
(D) Assertion (A) is false, but Reason (R) is true. अभिकथन (A) : [1, 2, 3] + '123' पाइथन में एक अमान्य एक्सप्रेशन (invalid expression) है ।
Assertion (A): [1, 2, 3] + '123' is an invalid expression in Python.
तर्क (R) : पाइथन में लिस्ट (list) को स्ट्रिंग (string) के साथ जोड़ा नहीं जा सकता ।
Reason (R) : In Python, a list cannot be concatenated with a string. अभिकथन (A) : SQL में प्राइमरी (PRIMARY) KEY अवरोध (constraint) यह सुनिश्चित करता है कि कॉलम में प्रत्येक value अलग (unique) हो और NULL न हो ।
Assertion (A): The PRIMARY KEY constraint in SQL ensures that each value in the column(s) is unique and cannot be NULL.
तर्क (R) : कैंडिडेट (Candidate) keys प्राथमिक (Primary) key बनने के योग्य नहीं होतीं ।
Reason (R) : Candidate keys are not eligible to become a primary key. खण्ड - ख / SECTION - B
(7 x 2 = 14) पाइथन (Python) में डिफॉल्ट पैरामीटर्स (default parameters) और पोज़िशनल पैरामीटर्स (Positional parameters) के बीच क्या अंतर है? एक फंक्शन हेडर (Function header) का भी उदाहरण दीजिए जो इन दोनों का प्रयोग करता है।
What is the difference between default parameters and positional parameters in Python? Also give an example of a function header which uses both. निम्नलिखित कार्य करने के लिये एक पाइथन स्टेटमेंट लिखिये (केवल अंतर्विष्ट (BUILT_IN) फंक्शन (FUNCTION) / मैथड (METHODS) का प्रयोग कीजिए ।
Write a Python statement to perform the following tasks: (USE BUILT_IN FUNCTIONS/METHODS ONLY)
(i) लिस्ट (List) L को संशोधित किये बिना नई लिस्ट (List) L1 में आरोही क्रम (ascending order) में लिस्ट (List) L के एलीमेंट्स (elements) को व्यवस्थित (arrange) करना । / To create a new list L1 containing the elements of list L arranged in ascending order, without modifying list L.
(ii) दिया गया अक्षर (character), ch एक वर्ण (alphabet) है या एक अंक है यह जाँच करने के लिये एक स्टेटमेंट (statement) देना । / A statement to check whether the given character, ch is an alphabet or a number. यह मानते हुये कि पाइथन में D1 एक डिक्शनरी (dictionary) है,
Assuming that D1 is a dictionary in Python,
(i) (a) एक पाइथन एक्सप्रैशन (Python expression) लिखिये, यह जाँच करने के लिये कि Key 'RNO', D1 में है या नहीं। / Write a Python expression to check if the key, 'RNo' is present in D1.
अथवा / OR
(b) यह जाँच करने के लिये एक Python expression लिखिये कि D1 की किसी key में value 12 है। / Write a Python expression to check if any key in D1 has a value 12.
(ii) (a) D1 में यदि key 'RNO' न हो तो key value pair 'RNO': 12 को जोड़ने के लिये अंतर्विष्ट (BUILT_IN) फंक्शन का प्रयोग करते हुए एक अकेला statement लिखिये । यदि key 'RNO' विद्यमान हो तो function को इसका वैल्यू (value) प्रदर्शित करना चाहिए । / Write a single statement using a BUILT_IN function to add the key: value pair 'RNo': 12, if the key 'RNo' is not present in D1. However, if the key 'RNo' is present, the function should return its value.
अथवा / OR
(b) D1 से सभी elements को हटाने (delete करने) के लिये एक statement लिखिये । / Write a single statement to delete all the elements from D1. निम्नलिखित कोड (Code) के निष्पादन (execution) पर दिये गये विकल्पों से कौन सा/से संभावित विकल्प प्रदर्शित नहीं होंगे ? यह भी उल्लेख कीजिये कि कितनी पुनरावृत्तियों के लिये code में दिया गया for loop चलेगा ?What possible output(s) from the given options will NOT be displayed when the following code is executed? Also, mention, for how many iterations the for loop in the given code will run?import randoma = [1, 2, 3, 4, 5, 6]for i in range(4):j = random.randrange(i, 5)print(a[j], end='-')print()Options:
(A) 3-4-5-4-
(B) 2-2-4-5-
(C) 4-3-3-5-
(D) 5-1-2-4- नीचे दिये गये फंक्शन को पैरामीटर के रूप में string s को स्वीकार करने और string में दिखाई देने वाले स्वरों (Vowels) की संख्या को रिटर्न (return) करने के लिये लिखा गया है। इस कोड में कुछ त्रुटियाँ हैं। कोड का सावधानीपूर्वक अवलोकन कीजिए और सभी लॉजिकल त्रुटियों (logical errors) और सिन्टेक्स त्रुटियों (Syntax errors) को दूर करने के बाद इसे पुनः लिखिये । किये गये सभी सुधारों को रेखांकित कीजिये ।The function given below is written to accept a string s as a parameter and return the number of vowels appearing in the string. The code has certain errors. Observe the code carefully and rewrite it after removing all the logical and syntax errors. Underline all the corrections made.def CountVowels(s):
c = 0
for ch in range(s):
if 'aeiouAEIOU' in ch:
c = +1
return(ch) सुश्री जोया एक फैक्ट्री में उत्पादन प्रबंधक (Production Manager) हैं जो मिनरल वॉटर (mineral water) की पैकेजिंग करती है। फैक्ट्री में उपलब्ध स्टॉक की जानकारी रखने के लिये डेटाबेस में एक सारणी (table) तैयार करने का वह निर्णय लेती है। सारणी के प्रत्येक रिकॉर्ड में निम्नलिखित फील्ड शामिल होंगे :Ms. Zoya is a Production Manager in a factory which packages mineral water. She decides to create a table in a database to keep track of the stock present in the factory. Each record of the table will have the following fields:W_Code : वस्तुओं का कोड / Code of the item (type - CHAR(5))W_Description : वस्तु का विवरण / Description of the item (type - VARCHAR(20))B_Qty : वस्तु की बकाया मात्रा / Balance quantity of the item (type - INTEGER)U_Price : वस्तु का यूनिट मूल्य / Unit Price of the item (type - FLOAT)सारणी (table) का नाम W_STOCK है। / The name of the table is W_STOCK.(i) (a) उपर्युक्त सारणी (table) बनाने के लिये एक SQL command लिखिये । (W_Code प्राइमरी (primary) key होना चाहिए ।) / Write an SQL command to create the above table (W_Code should be the primary key).
अथवा / OR
(b) क्या U_Price उपर्युक्त सारणी की प्राइमरी key हो सकती है ? अपने उत्तर का औचित्य बताइये । / Can U_Price be the primary key of the above table? Justify your answer.
(ii) (a) यह मानते हुये कि table W_STOCK पहले से ही बनी हुई है, टेबल में एक एट्रीब्यूट (attribute) E_Date (DATE type का) जोड़ने के लिये एक SQL command लिखिये । / Assuming that the table W_STOCK is already created, write an SQL command to add an attribute E_Date (of DATE type) to the table.
अथवा / OR
(b) यह मानते हुये कि table W_STOCK पहले से ही बनी हुई है, table से B_Qty कॉलम हटाने के लिये एक SQL command लिखिये । / Assuming that the table W_STOCK is already created, write an SQL command to remove the column B_Qty from the table. (a) बस टोपोलॉजी (Bus topology) का एक फ़ायदा और एक नुकसान बताइये । / List one advantage and one disadvantage of Bus topology.
अथवा / OR
(b) कम्प्यूटर नेटवर्क के संदर्भ में प्रोटोकॉल (Protocol) क्या है? वेब पर हाइपरटेक्स्ट को ट्रांसमिट करने के लिये किस Protocol का प्रयोग किया जाता है? / What is protocol in the context of computer networks? Which protocol is used to transmit hypertext across the web? खण्ड - ग / SECTION - C
(3 x 3 = 9) (a) एक पाइथन फंक्शन लिखिये जो "Space.txt" नामक text file में उपस्थित अंकों (digits) की संख्या की गणना करता है और उन्हें रिटर्न (return) करता है। उदाहरण के लिये, यदि फ़ाइल में यह सामग्री हो :Write a Python function that counts and returns the number of digits appearing in the text file "Space.txt". For example, if the file contains:Space exploration has unlocked incredibleadvancements in technology and science. Since thefirst moon landing in 1969, space agencies have sentprobes to Mars, Jupiter and beyond. The ISS,orbiting Earth at about 400 km, serves as a hub forresearch. With missions planned for 2030, humanity'scosmic journey continues!तो फंक्शन को 11 रिटर्न (return) करना चाहिए । / Then the function should return 11.अथवा / OR(b) एक पाइथन फंक्शन लिखें जो Space.txt नामक टेक्स्ट फाइल से उन शब्दों को प्रदर्शित करता है जिसमें 'e' अक्षर कम से कम दो बार आते हों। उदाहरण के लिये, यदि फ़ाइल में यह सामग्री हो :Write a Python function that displays the words in which the lowercase letter 'e' appears at least twice in the text file 'Space.txt'. For example, if the file contains:Space exploration has unlocked incredibleadvancements in technology and science. Since thefirst moon landing in 1969, space agencies have sentprobes to Mars, Jupiter and beyond. The ISS,orbiting Earth at about 400 km, serves as a hub forresearch. With missions planned for 2030, humanity'scosmic journey continues!तो फंक्शन को यह प्रदर्शित करना चाहिए : / Then the function should display:
incredible advancements science. agencies serves research. (a) FruitStack नामक एक stack, जो कि list (लिस्ट) से इम्प्लीमेंट (implement) किया गया है, में कुछ फलों का रिकॉर्ड है। प्रत्येक रिकॉर्ड को 'Name', 'Origin', 'Price' और 'Expiry' Keys वाली एक dictionary के रूप में दिखाया गया है। एक नमूना रिकॉर्ड यहाँ दिया गया है :A stack named FruitStack, implemented using list, contains records of some fruits. Each record is represented as a dictionary with keys 'Name', 'Origin', 'Price', and 'Expiry'. A sample record is given here:{'Name': 'Apple', 'Origin': 'France', 'Price': 120, 'Expiry': '12-08-2025'}FruitStack पर विनिर्दिष्ट प्रचालनों (Operations) के निष्पादन के लिये पाइथन में निम्नलिखित यूजर डिफाइन्ड फंक्शन (User defined functions) को लिखिये :
Write the following user-defined functions in Python to perform the specified operations on FruitStack:
(i) push_fruit(FruitStack, Fruit): यह फंक्शन FruitStack स्टैक और एक नये रिकॉर्ड Fruit को आर्गमेंट (argument) के रूप में लेता है और अगर मूल्य (Price) 100 से कम है, तो Fruit में स्टोर किए गए record को FruitStack में पुश (push) करता है। / This function takes the stack FruitStack and a new record Fruit as arguments and pushes the record stored in Fruit onto FruitStack if the Price is less than 100.
(ii) pop_fruit(FruitStack): यह फंक्शन स्टैक (stack) से सर्वोच्च (topmost) रिकॉर्ड को निकाल (pop) कर इसे रिटर्न (return) करता है। यदि stack पहले से ही खाली हो तो फंक्शन को "UNDERFLOW" प्रदर्शित करना चाहिए । / This function pops the topmost record from the stack and returns it. If the stack is already empty, the function should display "UNDERFLOW".
(iii) display(FruitStack): यह फंक्शन सर्वोच्च एलीमेंट (topmost element) से शुरू करके Stack के सभी elements को प्रदर्शित करता है। यदि stack खाली (empty) हो तो फंक्शन को "EMPTY STACK" प्रदर्शित करना चाहिए । / This function displays all the elements of the stack starting from the topmost element. If the stack is empty, the function should display 'EMPTY STACK'.
अथवा / OR
(b) User से 10 integers को input करने के लिये एक पाइथन प्रोग्राम लिखिये । यदि User कोई तीन अंकीय सम पूर्णांक (three digit even integer) प्रविष्ट करता है तो इसे stack में डाल दें। सभी इनपुट लेने के बाद, stack से सभी तीन अंको की सम संख्याएँ (three digit even integers) pop करें और उन्हें प्रदर्शित (display) करें। उदाहरण के लिये यदि यूजर, 12, 31, 320, 457, 6, 92, 924, 220, 1, 218 की प्रविष्टि (entry) करता है तो Stack में यह होना चाहिए :
320, 924, 220, 218
और प्रोग्राम का output यह होना चाहिए :
218 220 924 320
Write a Python program to accept 10 integers from the user. If the entered number is a three-digit even integer, push it onto a stack. After all inputs are taken, pop all the three-digit even integers from the stack and display them. For example, if the user enters 12, 31, 320, 457, 6, 92, 924, 220, 1, 218, then the stack should contain:
320, 924, 220, 218
and the output of the program should be :
218 220 924 320 (a) निम्नलिखित कोड (code) का output लिखिये :
Write the output of the following code :
def Exam2026(given):
new = []
for ch in given[1:-1]:
if ch.isupper():
new.reverse()
elif ch not in new:
new.append(ch)
elif ch in new:
new.pop()
print(new)
Exam2026("Gold-24Medals")
अथवा / OR
(b) निम्नलिखित कोड का output लिखिए :
Write the output of the following code :
def Exam2026(given):
new = 0
while given:
if new % 2:
new += given % 10
else:
new += given % 5
print(new, end='-')
given //= 10
Exam2026(123456) खण्ड - घ / SECTION - D
(4 x 4 = 16) अभिषेक ने STOCK नाम से एक सारणी (table) तैयार की है जिसमें उसकी दुकान में पैकेट बंद दूध के data रखने के रिकॉर्ड का एक सेट (set) है। Table तैयार करने के बाद उसने आँकड़ों (data) की प्रविष्टि की और table का रूप इस प्रकार बना :Abhishek has created a table, named STOCK, with a set of records to maintain the data of packaged milk in his shop. After creating the table, he entered the data and the table looked as follows:Code | Type | Volume | Qty | Price
AF0.5 | F | 0.5 | 300 | 38.00
MF0.5 | F | 0.5 | 250 | 36.50
MT1.0 | T | 1.0 | 150 | 64.00
AT1.0 | T | 1.0 | 100 | 66.00
PD1.0 | D | 1.0 | 50 | 52.00
PT0.5 | T | 0.5 | 78 | 30.00 (a) ऊपर दिये गये data के आधार पर निम्नलिखित कार्यों के लिये SQL queries लिखिये । / Based on the data given above, write the SQL queries for the following tasks:
(i) प्रत्येक प्रकार के दूध के लिये उसकी किस्म (Type) और अधिकतम मूल्य (Maximum Price) दिखाना । / To display Type and the maximum Price for each Type of milk.
(ii) प्रत्येक रिकॉर्ड के लिए Price को 0.5 बढ़ाना है जहाँ किस्म (Type) 'F' है। / For each record, increase the Price by 0.5 where Type is 'F'.
(iii) स्टॉक के कुल मूल्य को प्रदर्शित करना (Qty * Price का कुल योग) / To display the total value of the stock (total of Qty * Price).
(iv) उन सभी रिकॉर्ड्स के विस्तृत विवरण दिखाना जहाँ Code, 'A' से शुरू होता है। / To display the details of all records where Code starts with 'A'.
अथवा / OR
(b) ऊपर दिये गये table STOCK पर विचार करते हुए निम्नलिखित queries के निष्पादन पर output लिखिये : / Considering the table STOCK as given above, write the output on execution of the following queries:
(i) SELECT Volume, Qty, Price FROM STOCK WHERE Type IN ('F', 'D');
(ii) SELECT Code, Qty FROM STOCK WHERE Price BETWEEN 30 AND 50;
(iii) SELECT DISTINCT Type FROM STOCK;
(iv) SELECT Volume, count(*) FROM STOCK GROUP BY Volume; "States.csv" नामक एक csv फ़ाइल में भारत के सभी राज्यों के कुछ आँकड़ें हैं। फ़ाइल के प्रत्येक रिकॉर्ड में निम्नलिखित आँकड़े हैं :राज्य का नामराज्य की राजधानीराज्य की जनसंख्याराज्य की राजभाषाउदाहरण के लिये फ़ाइल में एक नमूना रिकॉर्ड इस प्रकार है :['Andhra Pradesh', 'Amaravati', 52221000, 'Telugu']एक Python प्रोग्राम लिखें जो इस फाइल से डेटा पढ़े और उन सभी रिकॉर्डस को, जहाँ जनसंख्या 10000000 से ज्यादा है, एक दूसरी csv फाइल 'More.csv' में जोड़ दें।टिप्पणी : "States.csv" में Header row भी है। Header row को More.csv में कॉपी नहीं किया जाना चाहिए ।A csv file "States.csv" contains some data about all the states of India. Each record of the file contains the following data:Name of the StateCapital of the StatePopulation of the StateOfficial Language of the State
For example, a sample record in the file is :
['Andhra Pradesh', 'Amaravati', 52221000, 'Telugu']
Write a Python program which reads the data from this file and appends all those records where population is more than 10000000 into another csv file 'More.csv'.
Note: "States.csv" also contains the Header row. The Header row should NOT be copied to "More.csv". कल्पना कीजिये कि आप एक वित्तीय घराने (Finance House) के ऋण विभाग के प्रबंधक हैं। ऋणों का रिकॉर्ड रखने के लिये आपने दो सारणी (tables) : CUSTOMERS और LOANS तैयार की हैं। इन tables में नमूना आँकड़ें (sample data) नीचे दिये गये हैं :Assume that you are the Manager of the Loans department of a Finance House. To keep track of the loans you have created two tables: CUSTOMERS and LOANS. The sample data in these tables is given below:Table: CUSTOMERS
CID | C_Name | Phone
00001 | Raj Malhotra | 1234567890
00003 | David Xavier | 3456789012
00004 | Damini Iyer | 3156789012
00008 | Abdul | 2345678901 Table: LOANS
SNo | CID | L_Amt | L_Date | Terms | RoI
1 | 00003 | 200000 | 2025-12-06 | 60 | 7.80
2 | 00008 | 2500000 | 2023-08-09 | 60 | 9.00
3 | 00001 | 500000 | 2025-08-13 | 48 | 6.00
4 | 00003 | 300000 | 2026-12-07 | 36 | 8.00
5 | 00004 | 600000 | 2026-12-07 | 60 | 6.00 टिप्पणी : tables में जितने यहाँ दिखाये गये हैं उससे अधिक रिकॉर्ड्स भी हो सकते हैं। / Note: The tables may contain more records than shown here.
वित्तीय घराने के प्रबन्धन को आपसे कुछ रिपोर्ट्स की आवश्यकता है। रिपोर्ट्स तैयार करने के लिये निम्नलिखित आँकड़े प्राप्त करने हेतु queries लिखिये :
The management of the Finance House needs certain reports from you. Write the queries to extract the following data to create the reports:
(i) LOANS टेबल से उन रिकॉर्ड्स की संख्या जिनमें ब्याज दर (ROI) 7.0 से अधिक है। / Number of records from LOANS table where Rate of Interest (ROI) is above 7.0.
(ii) उन ग्राहकों के नाम जिनके ऋण की धनराशि (L_Amt) 1000000 से अधिक है। / Names of the customers whose loan amount (L_Amt) is above 1000000.
(iii) उन सभी रिकॉर्ड्स की C_ID, C_Name और Terms जिनकी ऋण की तारीख (L_Date) 31 दिसम्बर, 2024 के बाद की है। / C_ID, C_Name and Terms of all those records where Loan Date (L_Date) is after 31st December, 2024.
(iv) (a) ब्याज दर (ROI) के अवरोही क्रम (descending order) में सभी ऋणों का विवरण । / Details of all the loans in the descending order of ROI.
अथवा / OR
(b) LOANS table से प्रत्येक C_ID के लिये C_ID और औसत अवधि (term) । / C_ID and average term for each C_ID from the LOANS table. पीटर ने MySQL डेटाबेस, SCHOOL में Account नाम की एक टेबल बनाई है, जिसका स्ट्रक्चर इस प्रकार है :Peter has created a table named Account in MySQL database, SCHOOL, having following structure:Stud_id integerSname stringClass stringFees floatउन छात्रों का रिकॉर्ड दिखाने के लिए उसे एक पाइथन (Python) प्रोग्राम लिखने में मदद करें जिनकी फीस 5000 से कम है।Help him in writing a Python program to display records of those students whose fees is less than 5000.पाइथन (Python) और MySQL के बीच कनेक्शन (connection) करने के लिये निम्नलिखित को ध्यान में रखिये :Note the following to establish connectivity between Python and MySQL:Username: rootPassword: adminHost: localhost खण्ड - ङ / SECTION - E
(2 x 5 = 10) सूचना एवं संचार प्रौद्योगिकी (ICT) से संबंधित विभिन्न विषयों पर प्रशिक्षण कार्यशालायें (Training workshops) आयोजित करने के लिये Next Step एक संगठन है जिसके पास रिसोर्स व्यक्तियों (Resource Persons) का एक समूह है। इसके सभी रिसोर्स पर्सन का डेटा निम्नलिखित रिकॉर्ड स्ट्रक्चर (प्रत्येक रिकॉर्ड एक टपल है) का उपयोग करके RESOURCES.DAT नामक बाइनरी (Binary) फाइल में स्टोर किया जाता है। जहाँ :(R_ID, R_Name, R_Expertise, Charges)R_ID : रिसोर्स व्यक्ति की आई डी (Resource Person ID) (An integer)R_Name : रिसोर्स व्यक्ति का नाम (Resource Person Name) (A string)R_Expertise : रिसोर्स व्यक्ति की विशेषता का क्षेत्र (Area of Expertise of the Resource Person)Charges : कार्यशाला आयोजित करने के लिये प्रति घंटा शुल्क (रुपये में) / Charges (in rupees) per hour to conduct a workshopउदाहरण के लिये, फ़ाइल में यह रिकॉर्ड है :(12, 'P. Velusami', 'Machine Learning', 5000)NextStep is an organization which has a pool of resource persons to conduct training workshops on various topics related to ICT. The data of all its Resource Persons is stored in a binary file RESOURCES.DAT using the following record structure (each record is a tuple):(R_ID, R_Name, R_Expertise, Charges)where:R_ID: Resource Person's ID (An integer)R_Name: Resource Person's Name (A string)R_Expertise: Area of expertise of the Resource PersonCharges: Charges (in rupees) per hour to conduct a workshopFor example, a record in the file is :(12, 'P. Velusami', 'Machine Learning', 5000)इस संदर्भ में निम्नलिखित यूजर डिफाइन्ड फंक्शन (user defined functions) को पाइथन में लिखिये :
In this context, write the following user defined functions in Python :
(i) Append() : रिसोर्स व्यक्ति का डेटा इनपुट (input) करना और RESOURCES.DAT फ़ाइल में लिखना । / To input the data of a Resource Person and write it in the file RESOURCES.DAT.
(ii) Update() : प्रत्येक रिसोर्स व्यक्ति का शुल्क (Charges) 500 बढ़ाना । / To increase the Charges of each resource person by 500. संजीवनी, शैक्षणिक संस्थानों का एक बड़ा समूह है जिसका मुख्य कार्यालय (head office) हैदराबाद में है। यह अमृतसर में एक नयी यूनिवर्सिटी बनाने की योजना बना रहा है। अमृतसर विश्वविद्यालय के परिसर में प्रशासन (ADMIN), शिक्षण (ACADEMIC), छात्रावास (HOSTEL), खेल (SPORTS) जैसे चार ब्लॉक/भवन होंगे।विभिन्न ब्लॉकों/भवनों के बीच की दूरियों और अन्य दिये गये पैरामीटरों को ध्यान में रखते हुए प्वाइंट (i) से (v) तक में उल्लिखित मुद्दों / समस्याओं को हल करने के लिये आपको एक नेटवर्क-विशेषज्ञ के रूप में उनके लिए नेटवर्क संबंधी सर्वोत्तम समाधानों का सुझाव देने की आवश्यकता है।Sanjeevani is a big group of educational institutions with its head office in Hyderabad. It is planning to set up a new University in Amritsar. The Amritsar University Campus will have four blocks/buildings - ADMIN, ACADEMIC, HOSTEL, SPORTS. You, as a network expert, need to suggest the best network-related solutions for them to resolve the issues/problems mentioned in points (i) to (v), keeping in mind the distances between various blocks / buildings and other given parameters. Amritsar University Campus:ADMIN BlockACADEMIC BlockHOSTEL BlockSPORTS Block Block to Block distances (in Mtrs.)
FROM | TO | DISTANCE
प्रशासन (ADMIN) | शिक्षण (ACADEMIC) | 60 M
प्रशासन (ADMIN) | छात्रावास (HOSTEL) | 160 M
प्रशासन (ADMIN) | खेल (SPORTS) | 80 M
शिक्षण (ACADEMIC) | छात्रावास (HOSTEL) | 40 M
शिक्षण (ACADEMIC) | खेल (SPORTS) | 120 M
छात्रावास (HOSTEL) | खेल (SPORTS) | 150 M अमृतसर विश्वविद्यालय परिसर से हैदराबाद मुख्य कार्यालय की दूरी = 2000 कि.मी. है। / Distance of Hyderabad Head Office from Amritsar University Campus = 2000 km. प्रत्येक ब्लॉक में कम्प्यूटरों की संख्या इस प्रकार है : / Number of computers in each block is as follows:
ADMIN: 25
ACADEMIC: 600
HOSTEL: 120
SPORTS: 50 (i) अमृतसर विश्वविद्यालय परिसर के अंदर सर्वर (server) के सर्वाधिक उपयुक्त स्थान का सुझाव दीजिये । अपनी पसंद की पुष्टि कीजिए । / Suggest the most appropriate location of the server inside the Amritsar University Campus. Justify your choice.
(ii) अमृतसर विश्वविद्यालय परिसर के अंतर्गत विभिन्न ब्लॉकों को कारगर रूप से जोड़ने के लिये cable layout का नक्शा बनाइये । / Draw the cable layout to efficiently connect various blocks within the Amritsar University Campus.
(iii) अमृतसर परिसर के अंदर ब्लॉक के विभिन्न कम्प्यूटर्स को जोड़ने के लिये इस्तेमाल किए जा सकने वाले किन्हीं दो वायर्ड मीडिया (wired media) के नाम लिखिए । / Name any two wired media that can be used to connect various computers of a block inside Amritsar Campus.
(iv) शैक्षणिक प्रयोजनों के लिये विश्वविद्यालय, परिसर के अंदर चौबीसों घंटे चलने वाला (24x7), अपना FM चैनल प्रदान करेगा । FM द्वारा निम्नलिखित में से किस संचार माध्यम (Communication medium) का प्रयोग किया जाता है ? / For the academic purpose, the University will provide its own 24x7 FM channel within the University Campus. Which communication medium, out of the following, is used by FM?
(A) रेडियो तरंग (Radio Waves)
(B) माइक्रो तरंग (Micro Waves)
(C) इन्फ्रारेड तरंग (Infrared Waves)
(v) (a) छात्र अनेक ऑनलाइन (online) शैक्षणिक सत्रों और कार्यशालाओं में भाग लेंगे। इसमें श्रव्य दृश्य संचार (Audio-visual communication) शामिल होगा । उस प्रोटोकॉल (Protocol) का पूरा नाम लिखिये जिसका प्रयोग इंटरनेट के माध्यम से ऐसे संचार के लिये किया जाएगा । / The students will be attending a lot of online academic sessions and workshops. These will involve audio-visual communication. Write the full name of the protocol which will be used for such a communication through the internet.
अथवा / OR
(b) ब्लॉकों के बीच सिगनल (signals) की तीव्रता बढ़ाने के लिये अमृतसर विश्वविद्यालय परिसर में रिपीटर (repeater) कहाँ स्थापित किया जाना चाहिए ? अपने उत्तर का औचित्य दीजिए । / Where should a repeater be installed in Amritsar University campus to boost the signal between blocks? Justify your answer.
Computer Science Question Paper CBSE CLass 12
Chemistry Question paper CBSE Class 12
Business Studies Question Paper CBSE Class 12