What will be the output of the following Python code snippet?
def example(a):
a = a + '2'
a = a*2
return a
>>>example("hello")
indentation Error
cannot perform mathematical operation on strings
hello2
hello2hello2
Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api
# | Quiz |
---|---|
1
Discuss
|
Which is the correct operator for power(xy)?
Solution |
2
Discuss
|
What is the output of this expression, 3*1**3?
Solution |
3
Discuss
|
In python we do not specify types, it is directly interpreted by the compiler, so consider the following operation to be performed.
the objective is to make sure x has an integer value, select all that apply
Solution |
4
Discuss
|
Which one of these is floor division?
Solution |
5
Discuss
|
What is the answer to this expression, 22 % 3 is?
Solution |
6
Discuss
|
What will be the value of x in the following Python expression?
Solution |
7
Discuss
|
What is the value of the following expression?
Solution |
8
Discuss
|
What is the average value of the following Python code snippet?
Solution |
9
Discuss
|
The following is displayed by a print function call. Select all of the function calls that result in this output.
Solution |
10
Discuss
|
Evaluate the expression given below if A = 16 and B = 15.
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved