NEW
Font size
S
M
L
XL
WorksheetsPython Basics Quiz
Total questions: 10
Worksheet time: 5mins
Name
Class
Date
1.
Keyword used to define a function in Python.
a)
func
b)
def
c)
lambda
d)
define
2.
Data type used to store True or False.
a)
int
b)
bool
c)
str
d)
float
3.
Function to get user input from console.
a)
print()
b)
input()
c)
scan()
d)
read()
4.
Function to find the length of a list.
a)
count()
b)
size()
c)
len()
d)
length()
5.
Keyword used for conditional branching.
a)
loop
b)
for
c)
if
d)
when
6.
Tkinter is used for creating ____ in Python.
a)
Games
b)
Websites
c)
GUI
d)
Scripts
7.
Function that starts the Tkinter event loop.
a)
start()
b)
loop()
c)
run()
d)
mainloop()
8.
Function used to connect to an SQLite database.
a)
open()
b)
connect()
c)
link()
d)
join()
9.
Object used to execute SQL queries in SQLite.
a)
Executor
b)
Query
c)
Cursor
d)
Command
10.
Widget used to take text input in Tkinter.
a)
Text
b)
Entry
c)
InputBox
d)
Label
Reset
