0% found this document useful (0 votes)
16 views4 pages

Preboard II

Uploaded by

suganya divya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views4 pages

Preboard II

Uploaded by

suganya divya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

SECTION-A

1. State True or False:

Range(-1,-5) return values -1,-2,-3,-4.

2. RAthin wants to create a table Players with a column playerid which should carry non null values and
unique values. Which conatraint has to be given to the column?

(a) Primary Key (b) Not Null

(c) Default (d) Check

3. which of the following is a valid python if statement?

6 * 3 + 4 ** 2 // 5 – 8

(a) 13 (b) 14 (c) 12 (d)11

4. Write the output of the code given below:

mydict = {“name”: “Aman”, “age” : 26}

mydict[‘age’] = 27

mydict[‘address’] = “Delhi”

print(mydict.items())

(a) dict_items ([(‘name’,’Aman’), (‘age’, 27), (‘address’, ‘Delhi’)])

(b) dict_keys ([(‘name’,’Aman’), (‘age’, 27), (‘address’, ‘Delhi’)])

(c) dict_values ([(‘name’,’Aman’), (‘age’, 27), (‘address’, ‘Delhi’)])

(d) None of these

5. A table student has 15 columns and 100 rows. 10 are rows added later. What is the degree and
cardinality of the table now?

(a) Degree : 5, Cardinality:110 (b) Degree : 15, Cardinality:110

( c) (a) Degree : 10, Cardinality:90 (d) (a) Degree : 150, Cardinality:90

6. ABC corporation has its offices in the city of lucknow, connected together in a network. These offices
are separated by a distance of approximately 45-50km. which kind of network is formed?

(a) PAN (b) WAN (c) MAN (d) LAN


7.Given is a python string declaration: myexam=””@@CBSE Examination 2022@@” write the output of
print(myexam[::-2])

(a) 20 otnx SC@ (b) @20 mx S@

(c ) @20 otnmx SC@ (d) @120 otnmx sc@

8. consider following list for python language L = [13, 3.45, “Tree”, ‘Amar’ , [10, 8.91, ”Apple”], 456

The output of L[-2] will be

(a) (10, 8.91, ‘Apple’) (b) [10,8.91, ‘Apple’]

(c) {10, 8.91, ‘Apple’} (d) None of these

9. Which output lines of the following program will print the same result?

tup1 =(10, 20, 30, 40, 50, 60, 70, 80, 90)

print (tup1[ 5 : -1])

print (tup1[ 5])

print (tup1[ 5 :])

print (tup1[ -4 : 8])

(a) (1) and (2) (b) (1) and (4) (c) (2) and (3) (d) (1), (3) and (4)

10. what possible output are expected to be displayed on screen at the time of execution of the
program from the following code? Also specify the maximum values that can be assigned to each of the
variables From and To .

Import random

AR = [20, 30, 40, 50, 60, 70 ]

FROM = random .randint (1, 3)

TO = random.randint (2, 4)

for K in rnage (FROM, TO +1):

print (AR[K],end =”#”)

(a) 10#40#70# (b) 30#40#50# (c) 50#60#70# (d) 40#50#70#


11. Fill in the blanks:

The protocol used for remote login is __________

(a) FTP (b) Telnet (c) HTTP (d) IRCP

12. Given the following code. what should be filled in the missing statement for proper execution of the
code.

def reverse(n):

while n>0:

d= n% 10

rev =__________ + d

n//=10

print(“Reverse:”, rev)

(a) rev/10 (b) rev *10 (c) rev//10 (d) rev+10

13. State True or False:

“In a python program, if a break statement is given in a nested loop, it terminates the execution of all
loops in one go.

14. which of the following refers to the attribute that can uniquely identify the tuples within the
relation?

(a) Foreign Key (b) Candidate key (c) Alternate key (d) Primary key

15. A network with all client computer and no server is called_________________.

16. which of the following statements opens a csv file “stock.csv” for writing records into it?

(a) f = open(“stock.csv”, “w”) (b) ) f = open(“stock.csv”, “wb”)

(c) ) f = open(“stock.csv”, “ab”) (d) ) f = open(“stock.csv”, “r”)

You might also like