Question
1. What is the output of the following code? d = {0:'a', 1:'b', 2:'c', 3:'d'} for i in d.keys(): print(d[i]) a. a b c d
1. What is the output of the following code?
d = {0:'a', 1:'b', 2:'c', 3:'d'}
for i in d.keys():
print(d[i])
a. | a b c d | |
b. | 0 1 2 3 | |
c. | 0 a 1 b 2 c 3 d | |
d. | None of the above |
2. Which of the following is a math module function?
a. | sqrt | |
b. | isnum | |
c. | randint | |
d. | factor |
3.. Which of the following statements is used to write a single alternative decision structure?
a. | test-jump | |
b. | if statement | |
c. | if-else statement | |
d. | if-call |
4. and, or, and not are considered to be
a. | relational | |
b. | logical | |
c. | conditional | |
d. | ternary |
5. What is the output of the following?
x = ['ab', 'cd']
for i in x:
i.upper()
print(x)
a. | ['ab', 'cd'] | |
b. | ['AB', 'CD'] | |
c. | [None, None] | |
d. | None of he above |
6.Each repetition of a loop is known as a(n)
a. | cycle | |
b. | revolution | |
c. | orbit | |
d. | iteration |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started