Mention three types of if statements
Built-in function to change a text to a number
int
float
Two ways how to write the increment of a variable by 3 units
variable += 3 or variable = variable +3
Built-in function to request a prompt from a user over the terminal
input()
What are he two types of loops
While and For
Differences between assigning a value and comparing a value by its equality
= vs ==
Name six data types in Python
int, str, dict, float, list, dict, tuple
Name a definite loop
for loop
Code statement that differentiates a fruitful functions from a void function
return
The built-in function to change "43.23" to 42.23
float()
The essential elements of a boolean expression
logical comparison or TRUE/FALSE
Two mutable sequence data structures
list
dict
In PEMDAS, what does 'E' refer to?
Exponentiation
Built-in function that returns the variable type of a variable
type()
Code statement to get out from a loop
break
Location
File object
Algorithm
You get this type of error from trying to compute a text with a number (very often when you use input())
The index needed for reversing a word
[::-1]
Function from str to divide a text by a character or chain of characters
split()
To what two types of functions do the function print() belong?
built-in and void
The essential elements necessary to define a function
def
function name
colon
attributes are optional
The following is an example of what data type {1:2,3:4,5:6}
dict()
What code will you execute to get the last name from the following text, "James Gaskin"?
"James Gaskin".split(" ")[-1]
"James Gaskin".split()[-1]
List five built-in functions and explain their functionality.
print(), type(), dir(), input(), int() (any type conversion)
Function to get out of the Python interpreter
exit()