What is the result of the expression print("5" + "3") in Python?
What is a variable?
- A constant value
- A storage location in memory
- A reserved keyword
- A data type
What is the purpose of the else clause in an if-else statement?
- To execute a block of code only if a condition is true
- To handle exceptions
- To execute a block of code only if a condition is false
- To create a loop
Which of the following is a valid way to comment a single-line in Python?
/* This is a comment */# This is a comment<!-- This is a comment -->// This is a comment
Which data type is used to store whole numbers in Python?
Which of the following best describes the purpose of iteration in programming?
- To execute a block of code only if a condition is true
- To execute instructions in a specific order
- To repeat a set of instructions a certain number of times or until a condition is met
- To create reusable code
Which operator is used for integer division in Python?
Step through this pseudocode. What will be output?
What does the return statement do in a Python function?
- Ends the program execution
- Passes data back to the caller and terminates the function
- Skips the current iteration in a loop
- Outputs a message to the console
What is the purpose of the += operator in Python?
- Concatenate strings
- Assignment replacement
- Addition assignment
- Concatenate integers