

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















Term
1 of 61
Term
2 of 61
Give this one a try later!
returns a sorted list from an iterable handles file I/O operations
outputs text or variables to the console reads user input from the console
Don't know?
Give this one a try later!
reads user input from the console outputs text or variables to the console
Term
3 of 61
Term
4 of 61
converts a value to an integer returns the maximum value from a sequence
Don't know?
Give this one a try later!
Selection Indentation
Casting Parenthesis
Don't know?
Give this one a try later!
lists the modules imported in the current session
lists the keywords in the python language
lists the names in the current scope or attributes of an object lists the files in the current directory
Term
7 of 61
Term
8 of 61
Don't know?
Give this one a try later!
By initializing the variable outside the function scope
By declaring the variable with the 'nonlocal' keyword
By declaring the variable with the 'global' keyword
By assigning the variable inside a class definition
Don't know?
Give this one a try later!
organizes code around objects that encapsulate data and behavior
defines a set of logical conditions and lets the system deduce solutions.
describes what the program should accomplish without specifying how
focuses on the step-by-step execution flow of a program
Term
9 of 61
Term
10 of 61
Don't know?
Give this one a try later!
'list' a python error occurs. (must use variables of the same type)
local scope unordered, mutable collection of unique elements. {1,2,3}
Don't know?
Give this one a try later!
returns a sorted list from an iterable returns a unique list from an iterable
returns a reversed list from an iterable returns a tuple from an iterable
Don't know?
Term
13 of 61
· Stop: the index at which the slicing ends (exclusive) · Step (optional): The step or stride between characters.
It take the exponent of the value applied to it.
It reverses the string.
The 'step' portion of the slice is negative, indicating the stride between characters is reversed.
Don't know?
Give this one a try later!
It splits the string into a list based on whitespace
It removes leading and trailing whitespaces from a string
It replaces leading and trailing whitespaces with underscores
It removes all whitespace characters from a string
Don't know?
Term
14 of 61
Term
15 of 61
16 of 61
Give this one a try later!
the result is automatically promoted to a 'float'
a typeerror occurs because the types are incompatible
the result is automatically converted to a 'string'
the result is automatically truncated to an 'int'
Don't know?
Give this one a try later!
it rounds 'x' to 'n' decimal places it calculates the square root of 'x' to 'n' decimal places
it rounds 'x' to the nearest integer it truncates 'x' to 'n' decimal places
Don't know?
Term
18 of 61
Term
19 of 61
my_list = [1, 2, 3] my_list.append([4, 5]) # Appending a list as a single element print(my_list) # Output: [1, 2, 3, [4, 5]] Don't know?
Give this one a try later!
A copy of the list where changes to the copied list do not affect the original list.
A copy of the list that is identical to the original list in memory.
A copy of the list that contains only the first half of the original list's elements.
A copy of the list where changes to the copied list also affect the original list.
Don't know?
Give this one a try later!
determines the length of a sequence (string, list, tuple) returns the type of an object
outputs text or variables to the console reads user input from the console
Term
20 of 61
Term
21 of 61
Don't know?
Give this one a try later!
converts values to integers, floats, or strings; respectively returns the type of an object
returns the maximum or minimum value from a sequence
determines the length of a sequence (string, list, tuple)
Don't know?
Give this one a try later!
Camel case: each word, except for the first word, starts with a capital letter
Pascal case: each word starts with a capital letter
Snake case: each word in the variable is separated by an underscore.
describes what the program should accomplish without specifying how to achieve it.
Term
23 of 61
Term
24 of 61
Give this one a try later!
It performs floor division operation;
performs division and rounds down to the nearest whole number and discards the decimal part
It reverses the string.
The 'step' portion of the slice is negative, indicating the stride between characters is reversed.
It enhances output formatting by embedding variables in strings. (although 'f' strings are easier to read)
It returns the remainder of the division of two numbers.
Don't know?
Give this one a try later!
Camel case: each word, except for the first word, starts with a capital letter
Pascal case: each word starts with a capital letter
Snake case: each word in the variable is separated by an underscore.
Term
25 of 61
It performs floor division operation;
performs division and rounds down to the nearest whole number and discards the decimal part
string [start:stop:step]
· Start: the index from which the slicing begins (inclusive) · Stop: the index at which the slicing ends (exclusive) · Step (optional): The step or stride between characters.
list: Ordered, mutable sequence; [1,23] tuple: Ordered, immutable sequence; (1,2,3) range: represents a range of values; e.g. range(5)
Don't know?
Give this one a try later!
It is used to multiply a string by an integer
It is used to compare two strings for equality
It is used to add a space between two strings
It is used as a shorthand for concatenation and assignment
Don't know?
Term
Term
29 of 61
Give this one a try later!
It performs floor division operation;
performs division and rounds down to the nearest whole number and discards the decimal part
describes what the program should accomplish without specifying how to achieve it.
an unordered collection of key- value pairs.
my_dict = {'key':'value', 'name':'John'}
Truthy values are non-zero numbers and non-empty strings.
Falsy values are zero, None, and empty strings
Don't know?
Give this one a try later!
calculates the length of a sequence returns the type of an object
reads user input from the console outputs text or variables to the console
Term
30 of 61
Term
31 of 61
Don't know?
Give this one a try later!
It adds the exponent to the value applied to it.
It takes the square root of the value applied to it.
It multiplies the value applied to it by itself.
It take the exponent of the value applied to it.
Don't know?
Give this one a try later!
Camel case: each word, except for the first word, starts with a capital letter
Pascal case: each word starts with a capital letter
Snake case: each word in the variable is separated by an underscore.
Give this one a try later!
Give this one a try later!
Give this one a try later!
Give this one a try later!
To define blocks of code
What are truthy and falsy values in Python?
Truthy values are non-zero numbers and non-empty strings.
Falsy values are zero, None, and empty strings
What does this built in Python function do?: any(), all()
checks if any or all elements in an iterable are true
What is the primary use of whitespace in Python?
To define the structure and hierarchy of the code
What is a characteristic of Python as a dynamically-typed language?
Give this one a try later!
Give this one a try later!
Give this one a try later!
The interpreter determines the type of variable during runtime
What does this built in Python function do?: map(), filter()
applies a function to elements or filters elements based on a function
What does the string slicing operation 'text {::-1] do where text = "Hello, Python!"?
It reverses the string.
The 'step' portion of the slice is negative, indicating the stride between characters is reversed.
What are the 5 Variable name rules in Python?
What does the format() method do in Python?