Podcast
Questions and Answers
Which one of the following is NOT a type of error in programming?
Which one of the following is NOT a type of error in programming?
- Runtime error
- Syntax error
- Semantic error (correct)
- Logic error
What is the purpose of variables in programming?
What is the purpose of variables in programming?
- To execute functions
- To store and manipulate data (correct)
- To perform calculations
- To display output
What is the difference between a variable value and a literal?
What is the difference between a variable value and a literal?
- A variable value is assigned by the programmer, while a literal is a predefined value (correct)
- A variable value is stored in memory, while a literal is not
- There is no difference
- A variable value is a fixed value, while a literal can change
What is the purpose of the print()
function in Python?
What is the purpose of the print()
function in Python?
What is the correct way to find the length of a string in Python?
What is the correct way to find the length of a string in Python?