| Homework | Create a homework in a form of a quiz |
| Which subject | Computer science |
| What age group | Year or Grade 7 |
| What topic | logic |
| Question types | Mixed |
| Number of questions | 5 |
| Number of answers | 4 |
| Correct answers | Exactly 1 |
| Show correct answers | |
| Use images (descriptions) | |
| Any other preferences |
What is logic in computer science? A. A way of organizing data B. A way of thinking about problems and their solutions C. A way to communicate with other computers D. A type of computer hardware
Which of the following is an example of a logical operator in computer science? A. + B. * C. < D. AND
What is the output of the following code in Python:
x = 5 y = 7 if x > 4 and y < 8: print("True") else: print("False")
A. True
B. False
C. None
D. Error
Which of the following is an example of an if-else statement in computer science?
A. while loop
B. for loop
C. if statement
D. switch statement
What is the correct order of operations in logic in computer science? A. NOT, AND, OR B. AND, OR, NOT C. OR, NOT, AND D. NOT, OR, AND