Computer Quiz

Quiz




Unit 2 Control Statements

1 / 8

Which of the following is used to create a conditional statement in Python?

2 / 8

Which of the following keywords is used to exit a loop prematurely in Python?

3 / 8

Which of the following keywords is used to skip the current iteration of a loop and continue with the next iteration?

4 / 8

Which of the following lines of code is a correctly formatted block with an if statement?

a. if x > 0:
print("Positive number")
print("Checked number")

 

b. if x > 0:
print("Positive number")
print("Checked number")

c. if x > 0:
print("Positive number")
print("Checked number")

d. if x > 0:
print("Positive number")

5 / 8

Which of the following statements is true about the pass statement in Python?

6 / 8

Which of the following statements will execute a block of code repeatedly as long as a condition is true?

7 / 8

Which of the following tokens is a keyword in Python?

8 / 8

Which of the following tokens is a literal?

Your score is

The average score is 50%

0%

Leave a Reply

Your email address will not be published. Required fields are marked *