NEW
Font size
WorksheetsPython
Total questions: 15
Worksheet time: 8mins
Is Python case sensitive when dealing with identifiers?
yes
no
What is the maximum possible length of an identifier?
31 characters
59 characters
10 characters
None of the mentioned
Which of the following is invalid?
_a = 1
__a = 1
__str__ = 1
none of the mentioned
Which of the following is an invalid variable?
my_string_1
1st_string
__
Which of the following is not a keyword?
eval
assert
nonlocal
pass
All keywords in Python are in
lower case
UPPER CASE
Capitalized
True, False and None are capitalized while the others are in lower case.
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
Which of the following cannot be a variable?
__init__
in
it
on
What is the output of this expression, 3*1**3?
27
9
3
1
Which of these in not a core data type?
Lists
Dictionary
Class
Given a function that does not return any value, What value is thrown by default when executed in shell.
int
bool
void
none
Which of the following will run without errors ?
round(45.8)
round(6352.898,2,5)
round()
round(7463.123,2,1)
What is the return type of function id ?
int
float
bool
dict
What error occurs when you execute?
apple = mango
SyntaxError
NameError
ValueError
TypeError
Which of the following results in a SyntaxError ?
‘”Once upon a time…”, she said.’
“He said, ‘Yes!'”
‘3\’
”’That’s okay”’
