Which SQL clause is used to filter records based on a specified condition?
In a try - except block, where should the code that may raise an exception be placed?
- In the
except block - Outside both
try and except blocks - In the
finally block - Inside the
try block
How does an interpreter execute code in comparison to a compiler?
- Interpreters convert the entire program into machine code before execution
- Interpreters execute code line by line without producing a separate machine code file
- Interpreters only work with high-level languages
- Interpreters are faster than compilers in all scenarios
What is an exception?
- An error that occurs when a program runs out of resources or time.
- An error that occurs when a program encounters an invalid input or operation.
- An error that occurs when a program fails to meet its specifications or requirements.
- An error that occurs when a program behaves unexpectedly or unpredictably.
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 is the correct Boolean expression for this logic circuit?
X = NOT (A AND B)X = (NOT A) AND BX = NOT (A OR B)X = (NOT A) OR B
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
In a flowchart, what does this symbol represent?
- Subprogram
- Input
- Database
- Process
What is the value of
X when
A = 1, B = 0, C = 1?
What is the value of
Z if
A=1,
B=1,
C=0?