What is the purpose of an if statement in Python?
It executes instructions only when a condition is true.
What does IoT stand for?
Internet of Things.
What is a database?
An organized collection of related data.
Which programming structure can be used to repeat the blinking of an LED?
A loop.
Which Python library is used to draw shapes?
The turtle library.
A program displays “Pass” if a mark is at least 50 and “Fail” otherwise. Which structure is needed?
An if–else structure.
What is the main idea of IoT?
Connecting physical devices so they can collect, exchange, or respond to data.
A school wants to manage student names, grades, and marks efficiently. Why is a database suitable?
It organizes the information and allows quick searching, updating, and reporting.
What is the Serial Monitor used for?
Displaying information and sensor readings from Arduino.
How can a turtle draw a square using fewer instructions?
By using a loop that repeats moving forward and turning 90 degrees four times.
What is a loop used for in Python?
Repeating a group of instructions.
Why is a resistor used with an LED?
To limit the current and protect the LED.
Why is choosing the correct data type important?
It ensures that data is stored and handled correctly.
Which sensor can measure distance in an Arduino circuit?
The ultrasonic sensor.
Which Python library is used for mathematical operations?
The math library
Which loop is useful when the number of repetitions is known?
The for loop
What is the purpose of a breadboard?
It allows components to be connected and tested without soldering.
What is a query?
A request used to retrieve specific information from a database.
How does an ultrasonic sensor measure distance?
It sends sound waves and measures the returning echo.
What is the purpose of a function in Python?
It groups instructions that perform a specific task.
How many times does this loop execute?
for i in range(5):
print(i)
Five times.
A circuit contains an LED, resistor, and breadboard. What must be checked if the LED does not light?
The wiring, LED polarity, resistor connection, power, and program.
What does a condition in a query do?
It limits the records shown according to a rule.
Create a simple parking-assistance system using Arduino.
Use an ultrasonic sensor to measure distance and a buzzer to warn when a car is too close.
A function calculates the area of a rectangle using its length and width. What should the function receive as parameters?
The length and the width.