ComputerScience SQP
ComputerScience SQP
(c)Day_two (d) _2
2 Which of the following is not a keyword? 1
(a) eval (b) assert
(a) 14 (b) 27
(c) 12 (d) 0
5 Select the correct output of the code: 1
Options:
a. PYTHON-IS-Fun
b. PYTHON-is-Fun
c. Python-is-fun
d. PYTHON-Is -Fun
(a) 0.0
(b) 0
(c) 1.0
7 Which of the following will delete key-value pair for key = “Red” from a 1
dictionary D1?
a. delete D1("Red")
b. del D1["Red"]
c. del.D1["Red"]
d. D1.del["Red"]
8 Which of the following statement prints the shown output below? 1
hello\example\test.txt
(a) print("hello\example\test.txt")
(b) print("hello\\example\\test.txt")
(d) print("hello"\example"\test.txt")
9 Which of the following statement(s) would give an error during execution 1
of the following code?
tup = (20,30,40,50,80,79)
print(tup) #Statement 1
print(tup[3]+50) #Statement 2
print(max(tup)) #Statement 3
tup[4]=80 #Statement 4
Options:
a. Statement 1
b. Statement 2
c. Statement 3
d. Statement 4
>>>str[ : 2]
(a) he (b) lo
SECTION C
16 Write a program to print any table using while loop and for loop? 3
18 What is the use of random function? Define all the random functions 3
with example?
19 What do you know about math module? Write any five maths 3
function in python? With example?
20 Write a python script to take input for 3 numbers,check and print the 3
largest number?
SECTION D