WorksheetsFInal Exam(CC106)
Total questions: 40
Worksheet time: 20mins
Who created Python Programming Language?
Dennis Ritchie
Guido van Rossum
Bjarne Stroustrup
James Gosling
Which keyword is used for the "else if" condition in Python?
elseif
elif
else if
ef
Which symbol starts a comment in Python?
//
/*
#
<!--
How does Python define code blocks?
Curly braces
Indentation
Parentheses
Semicolons
Which function checks a variable’s data type in Python?
info()
type()
dtype()
datatype()
Which keyword defines a function in Python?
function
define
def
fun
Which data type is used for whole numbers in Python?
int
float
string
complex
Which method can generate a random integer in Python?
Which statement exits a loop immediately in Python?
end
stop
break
exit()
Which statement skips to the next loop iteration?
skip
continue
pass
next()
Which method is called when a new object is created in Python?
init()
start()
new()
init()
What symbol(s) denote a string in Python?
" " or ' '
#
<>
()
Which collection is ordered and changeable?
list
set
tuple
none of these
Which collection is ordered and unchangeable?
list
dictionary
tuple
set
Which keyword in Python makes a variable belong to the global scope in Python?
global
scope
setglobal
public
What is the purpose of the super() function in Python?
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 is the purpose of the pass statement in Python?
To pass control to the next function
To skip the current iteration
To define an empty class or function
To exit a loop
What is the correct way to create a function in Python?
function myFunction():
def myFunction():
create myFunction():
func myFunction():
Which keyword allows a child class to inherit from a parent class?
class Child inherits Parent
class Child(Parent)
inherits(Parent)
super inherits(Parent)
Which keyword defines an inline (anonymous) function?
inline
lambda
func
short
Which Arduino library is included to handle Bluetooth serial communication on the ESP32?
<WiFi.h>
<BluetoothSerial.h>
<BLEDevice.h>
<SoftwareSerial.h>
What component acts as an electronically operated switch to turn on and off high-voltage devices?
Transistor
Potentiometer
Relay
Diode
Which Arduino function is used to configure a pin as an output for driving the relay?
digitalWrite()
pinMode()
analogRead()
Serial.begin()
What argument do you pass to digitalWrite() to activate (turn on) the relay?
LOW
INPUT
HIGH
OUTPUT
Which function initializes serial communication for the serial-monitor control version?
Serial.read()
Serial.available()
Serial.begin()
Serial.print()
What baud rate is configured with Serial.begin() in the tutorial?
9600
57600
115200
74880
What two environmental parameters can the DHT sensor read?
Pressure and light
Temperature and pressure
Temperature and humidity
Humidity and soil moisture
Which method initializes the DHT sensor in setup()?
dht.setup()
dht.init()
dht.begin()
dht.start()
MIT App Inventor splits the interface into two main sections. What are they called?
Layout and Logic
Designer and Blocks
UI and Code
Screen and Script
Which Arduino IDE library must be installed to drive the I²C LCD?
LiquidCrystal
LiquidCrystal_I2C
Wire.h
SPI.h
Which method is called to initialize the LCD object before printing?
lcd.begin()
lcd.init()
lcd.start()
lcd.setup()
Which method turns on the LCD’s backlight?
lcd.lightOn()
lcd.backlight()
lcd.enableLight()
lcd.turnOnBacklight()
Which method clears all characters from the LCD?
lcd.reset()
lcd.clear()
lcd.erase()
lcd.clean()
Into which function must you place the LCD initialization calls (init() and backlight())?
loop()
setup()
main()
initialize()
What does a PIR sensor detect?
Humidity
Light intensity
Motion via infrared radiation
Sound
Which connectivity module provides cellular connectivity via 2G networks?
Zigbee
LoRa RA-02
SIM800
ESP32
Which sensor converts mechanical stress or vibrations into electrical signals?
PIR Sensor
Piezoelectric Sensor
Photodiode
Gyroscope
What is the function of actuators in IoT?
Connect devices to the internet
Process data
Convert electrical signals into actions
Collect environmental data
What type of sensor measures changes in velocity or orientation?
Accelerometer
LDR Sensor
Capacitive Sensor
DHT22 Sensor
Which of the following is NOT a key feature of IoT?
Connectivity
Real-time Monitoring
Manual Processing
Automation and Control
