Font size
WorksheetsPyhthon
Total questions: 24
Worksheet time: 41mins
What's the best colour of the alphabet
Tree
Python
Cat
Bush
How old is Steve Jobs
Dead
57
55
56
20
print(Hello world!)
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”’
Which of the following statements is true?
Python is a high level programming language.
Python is an interpreted language.
Python is an object-oriented language.
All of the above.
What is used to define a block of code (body of loop, fuction etc.) in Python?
Curly braces
Parenthesis
Indentation
Quotation
Which of the following is correct?
Comments are for programmers for better understanding of the program.
Python Interpreter ignores comment.
You can write multi-line comments in Python using triple quotes, either ''' or """.
All of the above
