WorksheetsPython 201 Vocabulary Review
Total questions: 57
Worksheet time: 29mins
Python is a programming language known for its:
complex syntax and low-level programming capabilities
simplicity and readability
exclusive use in web development
limited community support
Computer Science is the study of:
biology and life sciences
the human mind and behavior
computers and computational systems
physical education and sports
An instruction in programming is:
a command given to a computer processor to perform a specific task
a type of software
a programming language
a hardware component
A value in programming is:
A type of variable
A specific piece of data
A function
A programming language
A function in programming is:
a block of code that performs a specific task
a type of variable
a programming language
an error in the code
A function call is:
a way to define a function
a way to execute a function
a way to declare a variable
a way to create a loop
A program or code in programming is:
a set of instructions for a computer to execute
a type of hardware component
a user interface design
a network protocol
Executing a program means:
Running the program to perform its tasks
Writing the code for the program
Debugging the program
Designing the program's interface
An argument in a function call is:
a value passed to the function
the name of the function
the return type of the function
the function's documentation
An integer in programming is:
A data type that represents whole numbers
A data type that represents decimal numbers
A data type that represents characters
A data type that represents boolean values
A String in programming is:
a data type used to represent text
a type of loop
a conditional statement
a function
What is Syntax in programming?
Syntax is the set of rules that defines the combinations of symbols that are considered to be correctly structured programs in a programming language.
Syntax is the process of finding and fixing errors in a program.
Syntax is the logical sequence of steps that need to be followed to solve a problem.
Syntax is the part of the program where variables are declared.
What is a Syntax Error?
A syntax error is a mistake in the source code that makes it impossible to parse.
A syntax error is a logical error in the program.
A syntax error is an error that occurs during the execution of a program.
A syntax error is a type of runtime error.
What is a Comment in programming?
A piece of code that is executed by the compiler
A note or annotation in the source code for better understanding
A syntax error in the code
A function that returns a value
A Variable in programming is:
a constant value that cannot be changed
a storage location identified by a memory address
a type of function
an error in the code
Variable Assignment is:
a process of storing a value in a variable
a method to declare a variable
a way to delete a variable
a technique to copy a variable
Reassigning Variables means:
Changing the value stored in a variable to a new value
Creating a new variable with a different name
Deleting a variable from memory
Copying the value of one variable to another
A Return Value in programming is:
a value sent back by a function to the caller
a type of loop in programming
a syntax error in code
a variable declaration
A Data Type in programming is:
a classification of data which tells the compiler or interpreter how the programmer intends to use the data
a type of error in the program
a method to compile the program
a tool to debug the program
A string in programming is:
a sequence of characters
a type of loop
a numerical value
a conditional statement
How do you concatenate strings?
By using the '+' operator
By using the '-' operator
By using the '*' operator
By using the '/' operator
An integer in programming terms is defined as:
A data type used to represent whole numbers.
A data type used to represent decimal numbers.
A data type used to represent characters.
A data type used to represent boolean values.
A floating point number (float) is:
a whole number without a fractional part
a number with a fractional part
a number that can only be positive
a number that can only be negative
A boolean in programming is:
a data type that can store true or false values.
a data type that can store numbers.
a data type that can store text strings.
a data type that can store decimal numbers.
An operator in programming is:
a symbol that tells the compiler to perform specific mathematical or logical manipulations
a type of variable
a function that returns a value
a data structure
An expression in programming is defined as:
A combination of variables, constants, and operators that computes a value
A sequence of characters that represents a specific value
A block of code that performs a specific task
A set of instructions that a computer can execute
A binary operator is an operator that operates on how many operands?
One
Two
Three
Four
The modulus operator is used to:
Add two numbers
Subtract two numbers
Multiply two numbers
Find the remainder of a division
Incrementing in programming means:
Decreasing a value by one
Increasing a value by one
Multiplying a value by two
Dividing a value by two
What is decrementing in programming?
Increasing a value by one
Decreasing a value by one
Multiplying a value by two
Dividing a value by two
A logic expression is:
A mathematical statement that is always true
A statement that can be either true or false
A type of programming language
A physical representation of a circuit
A boolean value is:
A type of data that can be either true or false
A numerical value
A string of characters
A complex data structure
The 'equality' operator (==) does what?
Compares two values for equality
Assigns a value to a variable
Checks if a value is greater than another
Performs a logical AND operation
The 'not equal' operator (!=) is used to:
compare two values to check if they are equal
compare two values to check if they are not equal
assign a value to a variable
perform logical AND operation
The 'is' operator is used to:
compare values for equality
check if two variables point to the same object
assign a value to a variable
perform a logical AND operation
The 'is not' operator is used to:
compare the identity of two objects
compare the values of two objects
assign a value to a variable
check if a variable is not None
The 'and' operator is used to:
combine two conditions and returns true if both are true
combine two conditions and returns true if either is true
invert the boolean value of a condition
compare two values for equality
The 'or' operator is used to:
Combine multiple conditions and returns true if at least one condition is true.
Combine multiple conditions and returns true only if all conditions are true.
Negate a condition.
Assign a value to a variable.
The 'not' operator is used to:
invert the truth value of a condition
perform logical conjunction
perform logical disjunction
compare two values
A Library in programming is:
a collection of pre-compiled routines that a program can use
a place where books are stored
a type of programming language
a hardware component
A Turtle Library is:
a type of reptile
a programming library for drawing
a library for turtles
a collection of turtle images
What is an Object in Python?
A data type that represents a collection of values
An instance of a class
A function that returns a value
A module in Python
A Pixel is:
a type of fruit
a unit of digital image
a brand of clothing
a musical instrument
What is a Branch in programming?
A version control mechanism
A type of loop
A data structure
A programming language
What is a Condition in programming?
A statement that is always true
A statement that is always false
A statement that controls the flow of execution based on a boolean expression
A statement that defines a variable
What is an 'If' Statement in Python?
A conditional statement that executes a block of code if a specified condition is true.
A loop that iterates over a sequence of elements.
A function that returns a value based on input parameters.
A data structure used to store multiple values.
What is an 'Else' statement in Python?
A conditional statement that executes a block of code if the condition is true.
A loop that iterates over a sequence of elements.
A statement that executes a block of code if the previous conditions are false.
A function that returns a value.
An 'Elif' statement in Python is:
a loop structure
a conditional statement
a function definition
a variable assignment
A 'While Loop' in Python is:
a loop that runs a block of code as long as a specified condition is true.
a loop that iterates over a sequence of elements.
a function that calls itself.
a conditional statement that executes code based on a condition.
What is an 'Iteration' in the context of loops?
A single cycle through the loop
A variable declaration
A conditional statement
A function call
What is an 'Infinite Loop' and why should it be avoided?
A loop that runs indefinitely and can cause a program to freeze or crash.
A loop that runs a fixed number of times and is safe to use.
A loop that runs only once and then stops.
A loop that runs until a certain condition is met and then stops.
What is a string in Python?
A data type used to represent text
A function to convert numbers
A loop structure
A conditional statement
Immutable objects in Python are objects whose state cannot be modified after they are created. Which of the following is an example of an immutable object in Python?
List
Dictionary
Tuple
Set
What is an index in Python and how does it work?
An index in Python is a position number that identifies an element in a list or string.
An index in Python is a special type of variable that stores data.
An index in Python is a function that returns the length of a list.
An index in Python is a method to sort lists.
Define a substring with an example.
A substring is a contiguous sequence of characters within a string, e.g., 'cat' is a substring of 'concatenate'.
A substring is a type of data structure used in programming.
A substring is a function that divides a string into parts.
A substring is a method to concatenate two strings.
The 'in' operator in Python is used to:
check if a value is present in a sequence
perform arithmetic operations
define a function
create a loop
The 'not in' operator is used to:
Check if an element is not present in a sequence
Check if an element is present in a sequence
Assign a value to a variable
Compare two values
