WorksheetsBasic Python Quiz 3
Total questions: 14
Worksheet time: 7mins
What is Python primarily used for?
Solving puzzles
Building cars
Creating websites
Cooking recipes
Which of the following is a feature of Python?
Specialized for specific problems
Machine & platform-independent
Requires a license to use
Difficult to learn
How do you display output in Python?
Using the show() function
Using the display() function
Using the print() function
Using the output() function
What is an identifier in Python?
A type of snake
A named memory location that stores data
A type of data structure
A reserved word
Which of the following data types is not supported in Python?
List
Array
String
Numbers
When a new value is stored in a variable, its previous value gets _ _ _ _ _ _
Accepted
Overwritten
Overlapped
Ignored
The data type for 12.4 should be _ _ _ _ _ _
int
decimal
float
str
What are the features of Python?
Simple & easy to learn
Machine & platform-dependent
Requires a license to use
Difficult & hard to learn
Which of the following are Python Keywords.
car, bike, bus, train
apple, banana, orange, mango
dog, cat, bird, fish
for, while, if, else
What are the data types used in Python?
Integers, Floats, Strings
Apples, Bananas, Oranges
Numbers, Letters, Symbols
Dogs, Cats, Birds
What is the output of the following Python code?
x = 5
y = 3
print(x + y)
8
15
53
35
Which of the following is a valid variable name in Python?
my_variable
2nd_variable
variable-name
variable name
What is the result of the following Python expression?
5 / 2
2.5
2
2.0
2.2
Which of the following is a valid way to comment a single line in Python?
// This is a comment
/* This is a comment */
# This is a comment
%% This is a comment
