WorksheetsFunction & Scope of variable in Python
Total questions: 10
Worksheet time: 5mins
What will be the output of the following Python code?
212
32
9
27
567
98
None of the mentioned
What will be the output of the following Python code?
Function returns the sum
of all values
6
15
Function returns the sum
of all values
6
100
123
12345
None of the mentioned
What is a variable defined outside a function referred to as?
A static variable
A global variable
A local variable
An automatic variable
What is a variable defined inside a function referred to as?
A global variable
A volatile variable
A local variable
An automatic variable
What will be the output of the following Python code?
1
Nothing is displayed
0
An exception is thrown
What will be the output of the following Python code?
10
56
45
56
10
20
Syntax Error
What will be the output of the following Python code?
An exception is thrown because of conflicting values
1 2
3 3
3 2
What will be the output of the following Python code?
Integer
Tuple
Dictionary
An exception is thrown
What will be the output of the following Python code?
ZZZ
ZZ
An exception is executed
Infinite loop
What will be the output of the following Python code?
4
5
1
An exception is thrown
