WorksheetsIntroduction to Python Basics
Total questions: 40
Worksheet time: 20mins
Python is a:
Snake
Programming Language
Game
Movie
Which symbol is used for comments in Python?
//
#
%
What will print('Hello') show on the screen?
Hello
'Hello'
hello
Nothing
Which of these is a Python data type?
Banana
Integer
Car
Pencil
Which function is used to display output in Python?
print()
show()
display()
echo()
Which symbol is used for multiplication?
x
*
^
%
What is the result of 3 + 5?
35
8
53
Error
Strings in Python are written inside:
[]
{}
'' or ""
<>
Which operator is used for division?
/
//
%
-
What does len('apple') return?
4
5
6
Error
Python keywords are:
Reserved words
Any variable name
Colors
Functions only
Which one of these is a loop in Python?
if
while
elif
def
What will print(2 * 3) output?
6
5
23
Error
Which is a correct variable name?
1name
my_name
my-name
The symbol for checking equality is:
=
==
!=
<>
Which of these is NOT a Python data type?
int
str
bool
fruit
How do you start a comment in Python?
@
//
#
**
Which function is used to take input from a user?
input()
read()
scan()
type()
What is the result of 10 % 3?
1
3
0
10
Which symbol is used for exponent (power)?
^
**
//
%
Python was created by:
Bill Gates
Guido van Rossum
Elon Musk
Mark Zuckerberg
What will print('Hello' + 'World') show?
Hello World
HelloWorld
Hello+World
Error
The data type of '123' is:
int
str
float
bool
Which brackets are used to define a list in Python?
{}
[]
<>
()
The opposite of True is:
1
False
None
Zero
Which keyword is used for decision making?
if
loop
return
A collection of items stored in one variable is called:
integer
string
list
keyword
The function used to find the length of a string is:
count()
size()
len()
length()
To repeat a task many times, we use a:
if
while loop
return
Python files are saved with which extension?
.txt
.exe
.py
.java
What will print(10 // 3) output?
3
3.3
4
1
What will print('school'[0]) output?
s
h
o
l
Which operator is used for subtraction?
-
+
*
/
Which of these is a boolean value?
Yes
No
True
Number
What will print(type(3.5)) output?
int
str
float
bool
Which of these is a correct string?
'Hello'
Hello
Hello"
'Hello
What will print(2 ** 3) output?
5
6
8
9
Which operator is used for 'not equal'?
!=
==
=
><
What will print(len([1, 2, 3, 4])) output?
3
4
5
Error
Which of these is used to join two strings?
,
+
*
&
