Home
Services
Our Products
Palette RGB
Code Asteroid
Skill Test
Code War
Videos
News
Jobs & Hiring
Tech News
Startups
Aptitude Test
Technology
Developer Corner
Tutorials
Sign In
Sign Up
Jobs & Hiring
Tech News
Developer Corner
Startups
Home
Services
Our Products
›
Back
‹
Palette RGB
Code Asteroid
Skill Test
Code War
Videos
News
›
Back
‹
Jobs & Hiring
Tech News
Startups
Aptitude Test
Technology
›
Back
‹
Developer Corner
Tutorials
Instruction
Test have total 20 questions.
Test time is 20 minutes.
Python MCQ questions based on variables names & basic operators
Q 1.
Is Python case sensitive when dealing with identifiers?
yes
no
machine dependent
none of the mentioned
Q 2.
What is the maximum possible length of an identifier?
31 characters
63 characters
79 characters
none of the mentioned
Q 3.
Which of the following is invalid?
_a = 1
__a = 1
__str__ = 1
none of the mentioned
Q 4.
Which of the following is an invalid variable?
my_string_1
1st_string
foo
_
Q 5.
Why are local variable names beginning with an underscore discouraged?
they are used to indicate a private variables of a class
they confuse the interpreter
they are used to indicate global variables
they slow down execution
Q 6.
Which of the following is not a keyword?
eval
assert
nonlocal
pass
Q 7.
All keywords in Python are in _________
lower case
UPPER CASE
Capitalized
None of the mentioned
Q 8.
Which of the following is true for variable names in Python?
unlimited length
all private members must have leading and trailing underscores
underscore and ampersand are the only two special characters allowed
none of the mentioned
Q 9.
Which of the following is an invalid statement?
abc = 1,000,000
a b c = 1000 2000 3000
a,b,c = 1000, 2000, 3000
a_b_c = 1,000,000
Q 10.
Which of the following cannot be a variable?
__init__
in
it
on
Q 11.
Which is the correct operator for power(xy)?
X^y
X**y
X^^y
None of the mentioned
Q 12.
Which one of these is floor division?
/
//
%
None of the mentioned
Q 13.
What is the order of precedence in python?
i) Parentheses ii) Exponential iii) Multiplication iv) Division v) Addition vi) Subtraction
i,ii,iii,iv,v,vi
ii,i,iii,iv,v,vi
ii,i,iv,iii,v,vi
i,ii,iii,iv,vi,v
Q 14.
What is the answer to this expression, 22 % 3 is?
7
1
0
5
Q 15.
Mathematical operations can be performed on a string.
True
False
Q 16.
Operators with the same precedence are evaluated in which manner?
Left to Right
Right to Left
Can't say
None of the mentioned
Q 17.
What is the output of this expression, 3*1**3?
27
9
3
1
Q 18.
Which one of the following has the same precedence level?
Addition and Subtraction
Multiplication, Division and Addition
Multiplication, Division, Addition and Subtraction
Addition and Multiplication
Q 19.
The expression Int(x) implies that the variable x is converted to integer.
True
False
Q 20.
Which one of the following has the highest precedence in the expression?
Exponential
Addition
Multiplication
Parentheses
Reload Test
Back skill tests
Time:
Want to get latest updates of IT industry?
Subscribe to our newsletter!