{1, 2, 3}
[1, 2, 3]
{}
(1, 2, 3)
Compilation/interpretation phase
Logical analysis
Program execution only
Documentation phase
Data is written successfully
File content is overwritten
Raises an exception
Nothing happens
Correctness and finiteness only
Finiteness and efficiency only
Correctness, finiteness, and clarity
Correctness and hardware dependency
10
5
Error
None
fun
u
Either f, u, or n
Row 1
Column 2
Element at row 1, column 2
Entire second row
file()
open()
fopen()
load()
What is the output of following?
print(round(4.567, 2))
4.56
4.57
4.5
writelines()
write()
readlines()
append()
np.create()
np.array()
np.ndarray()
np.makearray()
Local
Global
Enclosing
Built-in
Compiled, low-level language
Purely interpreted, machine-dependent language
High-level, interpreted language with dynamic typing
Assembly-level procedural language
extern
static
global
nonlocal
Use of multiple terminators
Absence of comments
Use of rectangles instead of parallelograms
A decision block with paths that do not reconverge logically
What will be printed?
x = 5 def f(): global x x = 10 f() print(x)
Converts string to int
Evaluates Python expression
Prints expression
Converts to float
==
is
has
in
Dictionary keys must be mutable
Dictionary values must be immutable
Dictionary reserves insertion order only in Python 2
Dictionary keys must be unique
3.333
3
4
3.0