1/15
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What does PEMDAS stand for in operations?
Parentheses, Exponents, Multiplication and Division (from left to right), Addition and Subtraction (from left to right)
What is the result of 5 // 2?
2, as integer division removes the decimal.
What does the % operator do?
The modulus operator returns the remainder of a division.
What does the str() function do?
Converts any value to a string.
What is the output of print(bool(0))?
False, since any number converted to boolean is true unless it is 0.
What function is used to calculate the square root in math?
math.sqrt() function.
How do you round a number to a specified decimal places in Python?
Use round(a, b), where a is the number and b is the number of decimal places.
What is the purpose of the find() method in strings?
It gives the index position of the character/substring searched, returning -1 if not found.
What is an algorithm?
A set of steps/instructions to solve a problem or accomplish a task.
What will print('Hello'.lower()) output?
hello, as it converts the string to lowercase.
What is the difference between a for loop and a while loop?
A for loop runs for a predetermined number of iterations, while a while loop continues as long as a condition is true.
What does the term 'identifier' mean in Python?
A name used to identify a variable, function, class, module, or other object.
What does the insert(index, item) method do in a list?
It inserts an item into the list at a specified index.
What is a 2D array?
An array that contains multiple arrays, which can be visualized as a table.
What does an f-string do in Python?
It allows for the creation of formatted strings that include variables.
How can you create an empty list in Python?
Use empty brackets, e.g., nums = [] .