What is the purpose of the lower() method for a string in Python?
- Converts the string to lowercase
- Converts the string to uppercase
- Checks if the string contains a specific substring
- Finds the index of a substring
What is the data type of the result of the expression 2.5 + 3 in Python?
What is the result of the expression print("5 + 3") in Python?
Which of the following statements is true about the if-elif-else structure?
- Only the
if part is mandatory; elif and else are optional elif must always be followed by an else statementelse must always be followed by an if statement- The
else part is mandatory
Which term is used to describe a single piece of data in a database table?
What is the purpose of the SQL SELECT statement?
- To insert data into a table
- To delete records from a table
- To retrieve data from a table
- To update existing records in a table
What does the break statement do in a loop?
- Continues to the next iteration of the loop
- Skips the current iteration and continues with the loop
- Executes a specific block of code repeatedly
- Ends the loop and transfers control to the next statement after the loop
Which operator is used to repeat a string a specific number of times in Python?
*repeat()iterate()replicate()
How do you remove an element from a Python list by its value?
remove(value)delete(value)discard(value)pop(value)
In Python, which keyword is used to exit a loop prematurely?