WorksheetsLong Quiz(CC106)
Total questions: 35
Worksheet time: 18mins
What is the correct structure for declaring a function in Python code.
function myFunction():
def myFunction():
create myFunction():
func myFunction():
Identify the valid class-declaration statement in Python from the choices below.
class MyClass[]:
class MyClass:
MyClass class:
def class MyClass():
Which syntax element is required when building a class that inherits functionality from another in Python?
inherits
extends
derive
class Child(Parent):
In object-oriented Python, what is the benefit of calling super() in a subclass?
To call a method from the child class
To delete an object
To call a method from the parent class
To initialize a class
What’s the proper method for creating a class-based object in Python code?
object = MyClass[]
object = new MyClass()
object = MyClass()
object = class MyClass()
How does Python interpret the statement range(5)?
[1, 2, 3, 4, 5]
[0, 1, 2, 3, 4]
(0, 1, 2, 3, 4)
0 to 5
What mechanism enables structured error handling in Python code?
try/except
do/catch
try/catch
handle/error
Why might a Python programmer use the pass keyword in a code block?
To pass control to the next function
To skip the current iteration
To define an empty class or function
To exit a loop
What built-in function is used to place an item at the end of a list?
append()
add()
push()
insert()
Which type of information does len() extract from a string or list?
Number of variables in the program
Memory size
C) Number of characters/items in an object
CPU cycles
At what point in the SDLC are system requirements identified and feasibility studies performed?
Design
Planning
Deployment
Maintenance
How is a use case defined in the context of designing software systems
A user interface sketch
A written description of user-system interaction
A marketing document
A backup plan
When developing Android apps, what language is most frequently chosen by developers?
Swift
Java
Ruby
PHP
What does the UAT phase aim to confirm before handing over the system to production?
To test server configurations
To confirm system security
To validate the software with end users
To measure system performance
What tool is widely used for version control?
Jira
Trello
Git
Xcode
Why is a Battery Management System or Protection Circuit Module used in rechargeable battery setups?
Enhance Wi-Fi signals
Prevent overcharging and short circuits in battery packs
Measure ambient temperature
Provide cloud data storage
What component is commonly used to control large electrical currents or fluid flow in a system?
Servo Motor
Solenoid Valve
Stepper Motor
Gyroscope
In low-energy, extended-range IoT systems, what wireless standard is typically used?
A) Bluetooth
B) Wi-Fi
C) LoRa
D) Zigbee
Which type of environmental detection is the MQ-2 module commonly used for?
Distance measurement
Gas detection (LPG, smoke)
Humidity sensing
Light sensing
What form of detection is the primary function of a passive infrared (PIR) sensor?
Humidity
Light intensity
Motion via infrared radiation
Sound
Which programming syntax is typically used for writing ESP32 code in the Arduino environment?
Python
Java
C++
JavaScript
Upon powering up the ESP32, which routine runs first by default?
loop()
setup()
main()
begin()
In Arduino sketches, what baud rate is most often used to establish serial communication for testing?
4800
57600
9600
115200
What role does the loop() block serve in the overall flow of an Arduino sketch?
Initializes pins
Runs once at boot
Runs continuously after setup()
Connects to WiFi
In Arduino programming, what command is used to define whether a pin acts as an input or output?
setPin()
pinMode()
configurePin()
definePin()
Which line of code sets pin 5 to output a voltage level corresponding to HIGH?
pinMode(5, ON);
digitalWrite(5, HIGH);
setPin(5, HIGH);
writePin(5, true);
To connect the ESP32 to a Wi-Fi network, what library must your code reference?
#include <WiFiClient.h>
#include <ESP32WiFi.h>
#include <WiFi.h>
#include <Internet.h>
How do you print information to the Serial Monitor in an Arduino sketch?
printSerial()
Serial.output()
Serial.writeLine()
Serial.println()
How do you create a delay in Arduino for a certain duration measured in milliseconds?
wait(ms)
sleep(ms)
pause(ms)
delay(ms)
In Arduino, which library provides functions for retrieving data from the DHT11 sensor?
#include <Sensor.h>
#include <DHT.h>
#include <TempSensor.h>
#include <Humidity.h>
Which option best represents the nature of Alternating Current in a circuit?
A type of current that flows in one direction only.
A current that increases and decreases in strength but never changes direction.
A type of current in which electrons periodically reverse their direction of flow.
A current that stops and starts rapidly based on the power source.
Among the following, which one regularly delivers alternating current?
A car battery
A wall outlet
A phone battery
A laptop battery
What purpose does a resistor serve when added to an electronic system?
To increase the overall voltage in a circuit
To convert electrical energy into motion
To store electrical charge for later use
To limit or regulate the flow of current
What measurement unit is used for determining resistance in a circuit?
A. Volts (V)
B. Amperes (A)
C. Ohms (Ω)
D. Watts (W)
In a schematic, how can you tell if two intersecting wires are connected?
There will be no visual indication—it is always assumed they are connected.
The wires must intersect at exactly 90 degrees.
A dot or node at the intersection indicates a connection.
The wires will be curved slightly when they intersect.
