What file extension do python files have?
.py
Which variable type stores decimal numbers?
float
What is a collection of objects inside "[" and "]" called?
List
What is an parameter?
the variable listed inside the parentheses in the function definition
What does the function input() do, and what type of object does it return?
allows the user to type input. returns a string
What is the python function to get the length/size of a object?
What def() keyword creates?
a function
What will be the value of the following Python expression?
(4 + 3) % 5
2
To use modules (libraries) in another Python script, you must first ______ the module.
import
What are these symbols called?
+, ==, - , / , // , *, **, %
operators
Where does indexing start?
at 0
To remove an element from the list we use which Python command?
remove()
To comment a line in python, which symbol do you use?
# or """ """
Which type of error would arise here?
a = 5.888.4
SyntaxError
What is python file extension?
.py
To add a new element to a list we use which Python command?
append()
Which two flow-control statements loop through a set of statements, if a condition continues to be True?
"while" and "for"
number = 5
for i in range (number):
print(i)
Which one is a variable in this code?
number and i
What will be the output of the following Python code?
x = 'abcd'
for i in range(len(x)):
print(i)
0 1 2 3
What will be the output of the following Python code?
>>>list = [1, 3, 9 , 0]
>>>print(list[2])
9