-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquiz -1.txt
76 lines (76 loc) · 1.8 KB
/
quiz -1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{1:'c',2:'a',3:'c',4:'b',5:'c',6:'b',7:'c',8:'d',9:'c',10:'a',11:'a',12:'c',13:'b',14:'c',15:'c'}
1. Which of the following cannot be a variable name ?
a Python
b MyName
c 2nd_Name
d My_NAme
2. Given the lists L=[1,3,6,82,5,7,11,92] , find the output of print(L[2:5])
a [6,82,5]
b [6,82,5,7]
c [3,6,82]
d [3,6,82,5]
3. Identify the valid arithmetic operator in Python from the following.
a ?
b <
c **
d and
4. Suppose a tuple T is declared as T = (10, 12, 43, 39), which of the following is incorrect?
a print(T[1])
b T[2] = -29
c print(max(T))
d print(len(T))
5. Suppose list1 is [1, 5, 9], what is sum(list1) ?
a 1
b 9
c 15
d Error
6. Identify the valid declaration of L -> L = ['Mon', '23', 'hello', '60.5']
a string
b list
c tuple
d dictionary
7. Which of the following types of table constraints will prevent the entry of duplicate rows?
a Select
b Distinct
c Primary Key
d NULL
8. Rearrange the following terms in increasing order of data transfer rates -> Gbps, Mbps, Tbps, Kbps, bps
a Kbps, Bps, Tbps, Mbps, Gbps
b Bps, Tbps, Mbps, Kbps, Gbps
c Kbps, Mbps, Bps, Gbps, Tbps
d Bps, Kbps, Mbps, Gbps, Tbps
9. Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?
a Error
b None
c 25
d 2
10. Evaluate (10 > 5 and 7 > 12 or not 18 > 3) ->
a 0
b 1
c -1
d 2
11. Which is the correct form of declaration of dictionary?
a Day={1:'monday',2:'tuesday',3:'wednesday'}
b Day=(1;'monday',2;'tuesday',3;'wednesday')
c Day=[1:'monday',2:'tuesday',3:'wednesday']
d Day={1'monday',2'tuesday',3'wednesday']
12. _______ is an example of Public cloud.
a Gmail
b Microsoft Teams
c Google Drive
d Bing
13. 'randint()' is a function of which python module ?
a math
b random
c turtle
d tkinter
14. What is the output of this expression, 3*1**3 ?
a 27
b 9
c 3
d 1
15. Suppose list1 is [2445,133,12454,123], what is max(list1) ?
a 2445
b 133
c 12454
d 123