stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Python quiz on operators and data types Flashcards | StudBud
Explore
/
Python quiz on operators and data types
Python quiz on operators and data types
20 terms
·
StudBud Administration
·
27 plays
Imported from external platform
Flashcards
20 cards
F
Practice quiz
P
Host live
L
Questions
20
Answers
1
print 9//2
4
4.0
None
4.5
2
Is nested if else allowed in python
None
May be true
True
False
3
Comparison operators are almost same in python as it was in C or C++
False
none of the above
True
except >=
4
These { } curly braces are used in if else block of python...state true or false
False
True
5
To convert a string or any other data type to integer, we use which fuction
hex(object)
bin()
all the above
int()
6
What is the output of the following prog: i
=
0
while
i < 3: print i i
++
print i
+
1
0224
02024
error
012234
7
what is the return type of id() function?
bool
string
float
int
8
19%2 in python is
8
none
9
1
9
"Python does not support increment and decrement operator"
True
False
10
Result of the expression (4 * 4 / 9 % 2) in python
None
2
1.77777
error
11
With downloading python from official link, integrated development environment that comes as default is
Pycharm
IDLE
Jupiter Note book
Google colab
12
Indentations are used in place of the curly braces in if else and other conditional statements in python
False
True
13
input() functions take values in _________ data type.
char
int
string
float
14
Which of the following is not a complex number?
k = 2 + 3J
k = 2 + 3l
k = 2 + 3j
k = complex(2, 3)
15
What is the output of print 0.1 + 0.2 == 0.3?
Error
Machine dependent
True
False
16
id() function is used for?
id returns the identity of the object.
Both above are correct
Every object doesn’t have a unique id
None are correct
17
We do not have switch cases in python?
True
False
18
Is python case sensitive in dealing with identifier?
False
True
19
"Mathematical operations can be performed on the string"..state true or false
False
True
20
which of the following has the highest precedence in the expression?
Multiplication
Addition
Exponential
Parentheses