Question 1
arr = ['pq', 'rs'] for z in arr: z.upper() print(arr) Predict the output of the following code.
['pq', 'rs']
['PQ', 'RS']
['PQ', 'rs']
None of these
Good Job!
Oops!
Currently there is no PrepInsta Explanation. Did you know?
You can also submit your own version of explanations under user explanation section and also view other submitted explanations by other users.
Please login to submit your explanation
You can check your performance of this question after Login/Signup
Start
Question 2
string="hello" count=0 for z in string: if(z!="l"): count=count+1 else: pass print(count) What is the output of the following code?
2
3
4
Question 3
1 2 3
1 3
0
0 3
Question 4
1
Infinite
Question 5
Variable
Steps counter
Fixed value
Random value
Iteration is said to be one kind of control strategy and it is a general strategy for controlling how a computation evolves. It is the counter for the Steps in looping statement.
Question 6
1 2 3 4
0 1 2 3
None of these.
Control exits the loop when number becomes 5
Question 7
True
False
Question 8
a b c d e f
abcdef
Error
NameError, z is not defined.
Question 9
z z z z ……
a a a a a……..
As the value of z or x isn’t changing, the condition will always evaluate to True.
Question 10
abcd
a b c d
range(str) is not allowed.
Please login to report
Login/Signup
Personalized Analytics only Availble for Logged in users
Analytics below shows your performance in various Mocks on PrepInsta
Your average Analytics for this Quiz
Rank
-
Percentile
0%
Completed
0/0
Accuracy
March 31, 2021
Login/Signup to comment
Login/Signup to comment