
NTRC DAY 3 QUIZ
Authored by Nehal Wadhwani
Computers
6th - 8th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the purpose of an if statement in Python?
a) To declare a variable.
b) To create a loop.
c) To define a function.
d) To make decisions based on conditions.
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following code?
x = 10
if x > 5:
print("x is greater than 5")
else:
print("x is not greater than 5")
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which operator is used to check if two values are equal in an if statement?
!=
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the purpose of a for loop in Python?
To create a condition.
To compare two values.
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the key difference between a for loop and a while loop?
A for loop is used only when we know the number of time to repeat code, a while loop is used to run a loop until a condition is met
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the purpose of the elif statement in Python?
It's used to end a loop.
It's a typo; there is no elif statement in Python.
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
In Python, a comment starts with the symbol ________.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?