\a
\t
\n
\b
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
<class 'int'>
<class 'float'>
<class 'complex'>
TypeError
33
45
35
30
variable
literal
identifier
comment
a_=3
_a=3
a?=3
All of these
What will be the output?
print(type(()))
<class 'set'>
<class 'dict'>
<class 'tuple'>
Error
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
Number
String
List
Slice
Graphical
Cross-Platform
Platform Dependent
Passing –O when running python
Assertions are disabled by default
Both A and B are wrong
Assertions cannot be disabled in python
get()
seek()
tell()
cur()
pi
anonymous
lambda
none of the above
eval
nonlocal
assert
finally
Interactive Mode
Script Mode
Both Interactive Mode or Script Mode
None of These
Comments
Expressions
Tokens
Flow of control
C
C++
JAVA
PHP
\\
All of the above
student
s12
123
_123
Variable names in Python cannot start with number. However, it can contain number in any other position of variable name.
Variable names can start with an underscore.
Data type of variable names should not be declared.
None of the above.
.py
.python
.p
None of these
100
128
256
No Limit
Lists
Dictionary
Tuples
Class
Keywords
Identifires
Token
Statement
int
float
bool
dict
Integer
Complex Number
None
list
tuple
class
dictionary
execute python
go python
python
run python
Bytecode execution
Syntax analysis
Output generation
Runtime evaluation
raise
try
val
with
Brackets
Indentation
Key
None of the above
Combination of Interactive and Script modes
Quotes
Braces
Parentheses
Hello
949227
True
"2'
char
Interpreter
Compiler
Combination of Compiler and Interpreter
all of these
Free and Open Source
Freeware
Open source
Shareware
English
32
31
Compilation/interpretation phase
Logical analysis
Program execution only
Documentation phase
Tuple
False
equal
yes
no
machine dependent
none of the mentioned
Python Interpreter.
Python compiler
Python Volatile machine
Portable virtual machine
Interface
Modularity
Client
Docstring
in
is
All
Variable
Literals
Identifiers
Comment
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}
What will the following code output?
a=‘INFOMAX’ a=10 print(type(a))
<class ‘str'>
<class ‘bool'>