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
|
Given a function that does not return any value, What value is thrown by default when executed in shell.
Solution |
2
Discuss
|
What data type is the object below?
Solution |
3
Discuss
|
What is the return type of function id?
Solution |
4
Discuss
|
Which of the following is the truncation division operator?
Solution |
5
Discuss
|
Which of the following operators has its associativity from right to left?
Solution |
6
Discuss
|
Which one of the following has the same precedence level?
Solution |
7
Discuss
|
Evaluate the expression given below if A = 16 and B = 15.
Solution |
8
Discuss
|
Operators with the same precedence are evaluated in which manner?
Solution |
9
Discuss
|
What are the values of the following Python expressions?
Solution |
10
Discuss
|
Which of these in not a core data type?
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved