Passing –O when running python
Assertions are disabled by default
Both A and B are wrong
Assertions cannot be disabled in python
C
C++
JAVA
PHP
.python
.py
.p
.pyt
int
string
complex
float
Error
Expression
Portability
Reliability
\n
\t
\\
All of the above
Interpreter
Compiler
Combination of Compiler and Interpreter
all of these
32
64
35
29
Number
String
List
Slice
/
//
#
!
yes
no
machine dependent
none of the mentioned
bool
void
None
Brackets
Quotes
Braces
Parentheses
Python is proprietary software.
Python is open-source software.
Python is hardware dependent.
Python cannot run on Linux.
What will the following code output?
a=‘INFOMAX’ a=10 print(type(a))
<class 'int'>
<class ‘str'>
<class ‘bool'>
1995
1972
1981
1991
student
s12
123
_123
Python Interpreter.
Python compiler
Python Volatile machine
Portable virtual machine
What is the output of the following code?
a=set('abc')b=set('cdef')print(a&b)
{'c'}
{'a','b','c','d','e','r'}
{c}
None of these
a_=3
_a=3
a?=3
All of these
Integer
Complex Number
.
?
What will be the output of the following Python code?
def power(x, y=2): r=1 for i in range(y): r=r*x return r print(power(3)) print(power(3,3))
Option A
Option B
Option C
Option D
Keywords
Identifires
Token
Statement
\a
\b
Graphical
Cross-Platform
Platform Dependent
variable
literal
identifier
comment
Flexibility
What will be the output of the following Python code
def func(a, b=5, c=10): print('a is', a, 'and b is', b, 'and c is', c) func(13, 17) func(a=2, c=4) func(5,7,9)
(A) a is 13 and b is 15 and c is 10
a is 2 and b is 5 and c is 4
a is 5 and b is 7 and c is 9
(B) a is 13 and b is 17 and cis 10
a is 2 and b is 4 and c is 4
a is 5 and b is 9 and c is 7
(C) a is 13 and b is 17 and c is 10
a is 2 and b is 5 and cis 4
(D) None of the above
option A
option B
option C
option D
Hello
949227
True
"2'
str
set
What will be the datatype of the var in the below code snippet?
var = 10print(type(var))var = "Hello"print(type(var))
Str and int
int and int
str and str
int and str
raise
try
val
with
pi
anonymous
lambda
none of the above
False
equal
get()
seek()
tell()
cur()
Docstring
Python Package Index
both a & b
list
tuple
class
dictionary
char
Interactive Mode
Script Mode
Both Interactive Mode or Script Mode
None of These
Comments
Expressions
Tokens
Flow of control
dict
email
ca$h
marks10
Python2Shar
High Level
Object Oriented
Low Level
Both A and B
Compiled only
Interpreted
Assembly
Machine
31 characters
63 characters
No limit but 79 characters for better redability
All of the above.
in
is
assert
All
Indentation
Key
None of the above
Combination of Interactive and Script modes