Save
not using
Bis
python
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Ha Thien An Nguyen
Visit profile
Cards (62)
What type of system does Python run on?
Interpreter system
View source
Why is indentation important in Python?
It defines the structure and flow of the code
View source
When is a variable created in Python?
When you assign a value to it
View source
Can a variable in Python change its type after being set?
Yes, a variable can change type after being set
View source
What must a variable name in Python start with?
A letter or underscore character
View source
Are variable names in Python case-sensitive?
Yes, variable names are case-sensitive
View source
What is the purpose of unpacking in Python?
Extracting values into variables
View source
What are global variables in Python?
Variables created outside of a function
View source
How is the length of an array calculated in Python?
Length = highest array index + 1
View source
What is used in Python instead of an array?
A list
View source
What is list comprehension in Python?
A shorter syntax to create a new list based on an existing list
View source
What are iterable objects in Python?
Objects from which you can get an iterator
View source
What are examples of iterable objects in Python?
Lists
Tuples
Dictionaries
Sets
Strings
View source
What is the purpose of the print() function in Python?
To output variables
View source
How can multiple variables be outputted using print()?
Using a comma or plus sign
View source
What does the in() function do in Python?
It allows input of values into a variable
View source
What does str() function return in Python?
Text type
View source
What does int() function represent in Python?
Numeric type without decimals
View source
What does float() function represent in Python?
Numeric type with one or more decimals
View source
How are scientific numbers represented in Python?
With "e" to indicate the power of 10
View source
What does abs() function return in Python?
Absolute value
View source
What does round() function do in Python?
Rounds a number
View source
How is a complex number represented in Python?
With a "j" as the imaginary part
View source
What is the purpose of list[] in Python?
To store multiple items in a single variable
View source
How is a tuple defined in Python?
Using round brackets ()
View source
What is the main characteristic of a tuple?
It is unchangeable
View source
What does range() function do in Python?
Returns a sequence of numbers
View source
What is the purpose of dict{} in Python?
To store data values in key: value pairs
View source
What is a characteristic of a dictionary in Python?
It is unordered
View source
What does set{} represent in Python?
Used to store multiple items in a single variable
View source
What is a characteristic of a set in Python?
It is unordered
View source
What does bool() function return in Python?
True or false
View source
What does the addition operator (+) do in Python?
Adds two values
View source
What does the subtraction operator (-) do in Python?
Subtracts one value from another
View source
What does the multiplication operator (*) do in Python?
Multiplies two values
View source
What does the division operator (/) do in Python?
Divides one value by another
View source
What does the modulo operator (%) do in Python?
Returns the remainder of a division
View source
What does the power operator (**) do in Python?
Raises a number to the power of another
View source
What does the floor division operator (//) do in Python?
Divides and returns the largest whole number
View source
What does the equality operator (==) check in Python?
Checks if two values are equal
View source
See all 62 cards