full_portion_qp
full_portion_qp
29/12/2024 CLASS:COMPUTER
XII SESSION: 2024-25 SCIENCE - 083
PREBOARD
COMPUTER SCIENCE (083)
Time allowed: 3 Hours Maximum Marks: 70
General Instructions:
● This question paper contains 37 questions.
● All questions are compulsory. However, internal choices have been provided in some questions.
Attempt only one of the choices in such questions
● The paper is divided into 5 Sections- A, B, C, D and E.
● Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
● Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
● Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
● Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
● Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
● All programming questions are to be answered using Python Language only.
● In case of MCQ, text of the correct answer should also be written.
import random
word='Inspiration'
Lot=2*random.randint(2,4)
for i in range(Lot,len(word),3):
print(word[i],end='$')
26 Identify Primary Key and Candidate Key present if any in the below table name 2
Colleges. Justify
Streng
Cid Name Location Year AffiUniv PhoneNumber
th
University
St. Xavier's
1 Mumbai 1869 10000 of 022-12345678
College
Mumbai
Loyola University
2 Chennai 1925 5000 044-87654321
College of Madras
Hansraj Delhi
3 New Delhi 1948 4000 011-23456789
College University
Christ Christ
4 Bengaluru 1969 8000 080-98765432
University University
Lady Shri
Delhi
5 Ram New Delhi 1956 2500 011-34567890
University
College
27 (I) 2
(A) What constraint/s should be applied to the column in a table to make it as
alternate key?
OR
(B) What constraint should be applied on a column of a table so that it becomes
compulsory to insert the value
(II)
(A) Write an SQL command to assign F_id as primary key in the table named flight
OR
(B)Write an SQL command to remove the column remarks from the table name
customer.
28 List one advantage and disadvantage of star and bus topology 2
OR
Define DNS and state the use of Internet Protocol.
OR
(B) Write a function that displays the line number along with no of words in it
from the file Quotes.txt
Example :
None can destroy iron, but its own rust can!
Likewise, none can destroy a person, but their own mindset can
The only way to win is not be afraid of losing.
Output:
Line Number No of words
Line 1: 9
Line 2: 11
Line 3: 11
30 (A) There is a stack named Uniform that contains records of uniforms Each record 3
is represented as a list containing uid, uame, ucolour, usize, uprice.
Write the following user-defined functions in python to perform the specified
operations on the stack Uniform :
(I) Push_Uniform(new_uniform):adds the new uniform record onto the stack
(II) Pop_Uniform(): pops the topmost record from the stack and returns it. If
the stack is already empty, the function should display “underflow”.
(III) Peep(): This function diplay the topmost element of the stack without
deleting it.if the stack is empty,the function should display ‘None’.
OR
(a) Write the definition of a user defined function push_words(N) which accept
list of words as parameter and pushes words starting with A into the stack
named InspireA
(b) Write the function pop_words(N) to pop topmost word from the stack and
return it. if the stack is empty, the function should display “Empty”.
Field Type
EventID int(9)
EventName varchar(25)
EventDate date
Description varchar(30)
Write the following Python function to perform the specified operations:
Input_Disp(): to input details of an event from the user and store into the table Event. The
function should then display all the records organised in the year 2024.
HR ADMIN
London Head
Head Head
Office
Accts Logistics