WorksheetsPython Lesson 1
Total questions: 10
Worksheet time: 7mins
Variables are containers for storing data values
True
False
Which of these is NOT a loop in python?
for loop
while loop
None of the above
if loop
What is a variable?
A box(memory location) where you store values
a type of graphics
Data type
a type of memory
Which of these is the best description of a list in Python?
A list is a collection of data that has an order and can be changed
A list is a lot of variables
A list is used for shopping
A list is a collection of data that cannot hold duplicated data and cannot be changed
Will "something is printed" be printed to the console?
Yes 👍
No 👎
Will "something is printed" be printed to the console?
Yes 👍
No 👎
Will "something is printed" be printed to the console?
Yes 👍
No 👎
What is the output of the following program?
1
2
3
4
5
Given the following list:
myList = [1,2,3,4,5,6]
which of these slices will return [1, 3, 5]?
myList[1::2]
myList[::2]
myList[-2::-2]
myList[:5:2]
myList[:6:2]
How many times will "hello" be printed to the console?
1
2
3
4
5
