wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

FInal Exam(CC106)

Total questions: 40

Worksheet time: 20mins

Name
Class
Date
1.

Who created Python Programming Language?

a)

Dennis Ritchie

b)

Guido van Rossum

c)

Bjarne Stroustrup

d)

James Gosling

2.

Which keyword is used for the "else if" condition in Python?

a)

elseif

b)

elif

c)

else if

d)

ef

3.

Which symbol starts a comment in Python?

a)

//

b)

/*

c)

#

d)

<!--

4.

How does Python define code blocks?

a)

Curly braces

b)

Indentation

c)

Parentheses

d)

Semicolons

5.

Which function checks a variable’s data type in Python?

a)

info()

b)

type()

c)

dtype()

d)

datatype()

6.

Which keyword defines a function in Python?

a)

function

b)

define

c)

def

d)

fun

7.

Which data type is used for whole numbers in Python?

a)

int

b)

float

c)

string

d)

complex

8.

Which method can generate a random integer in Python?

a)

random.choice()

b)

random.randrange()

c)

random.pick()

9.

Which statement exits a loop immediately in Python?

a)

end

b)

stop

c)

break

d)

exit()

10.

Which statement skips to the next loop iteration?

a)

skip

b)

continue

c)

pass

d)

next()

11.

Which method is called when a new object is created in Python?

a)

init()

b)

start()

c)

new()

d)

init()

12.

What symbol(s) denote a string in Python?

a)

" " or ' '

b)

#

c)

<>

d)

 ()

13.

Which collection is ordered and changeable?

a)

list

b)

set

c)

tuple

d)

none of these

14.

Which collection is ordered and unchangeable?

a)

list

b)

dictionary

c)

tuple

d)

set

15.

Which keyword in Python makes a variable belong to the global scope in Python?

a)

global

b)

scope

c)

setglobal

d)

public

16.

What is the purpose of the super() function in Python?

a)

To call a method from the child class

b)

To delete an object

c)

To call a method from the parent class

d)

To initialize a class

17.

What is the purpose of the pass statement in Python?

a)

To pass control to the next function

b)

To skip the current iteration

c)

To define an empty class or function

d)

To exit a loop

18.

What is the correct way to create a function in Python?

a)

function myFunction():

b)

def myFunction():

c)

create myFunction():

d)

func myFunction():

19.

Which keyword allows a child class to inherit from a parent class?

a)

class Child inherits Parent

b)

class Child(Parent)

c)

inherits(Parent)

d)

super inherits(Parent)

20.

Which keyword defines an inline (anonymous) function?

a)

inline

b)

lambda

c)

func

d)

short

21.

Which Arduino library is included to handle Bluetooth serial communication on the ESP32?

a)

<WiFi.h>

b)

<BluetoothSerial.h>

c)

<BLEDevice.h>

d)

<SoftwareSerial.h>

22.

What component acts as an electronically operated switch to turn on and off high-voltage devices?

a)

Transistor

b)

Potentiometer

c)

Relay

d)

Diode

23.

Which Arduino function is used to configure a pin as an output for driving the relay?

a)

digitalWrite()

b)

pinMode()

c)

analogRead()

d)

Serial.begin()

24.

What argument do you pass to digitalWrite() to activate (turn on) the relay?

a)

LOW

b)

INPUT

c)

HIGH

d)

OUTPUT

25.

Which function initializes serial communication for the serial-monitor control version?

a)

Serial.read()

b)

Serial.available()

c)

Serial.begin()

d)

Serial.print()

26.

What baud rate is configured with Serial.begin() in the tutorial?

a)

9600

b)

57600

c)

115200

d)

74880

27.

What two environmental parameters can the DHT sensor read?

a)

Pressure and light

b)

Temperature and pressure

c)

Temperature and humidity

d)

Humidity and soil moisture

28.

Which method initializes the DHT sensor in setup()?

a)

dht.setup()

b)

dht.init()

c)

dht.begin()

d)

dht.start()

29.

MIT App Inventor splits the interface into two main sections. What are they called?

a)

Layout and Logic

b)

Designer and Blocks

c)

UI and Code

d)

Screen and Script

30.

Which Arduino IDE library must be installed to drive the I²C LCD?

a)

LiquidCrystal

b)

LiquidCrystal_I2C

c)

Wire.h

d)

SPI.h

31.

Which method is called to initialize the LCD object before printing?

a)

lcd.begin()

b)

lcd.init()

c)

lcd.start()

d)

lcd.setup()

32.

Which method turns on the LCD’s backlight?

a)

lcd.lightOn()

b)

lcd.backlight()

c)

lcd.enableLight()

d)

lcd.turnOnBacklight()

33.

Which method clears all characters from the LCD?

a)

lcd.reset()

b)

lcd.clear()

c)

lcd.erase()

d)

lcd.clean()

34.

Into which function must you place the LCD initialization calls (init() and backlight())?

a)

loop()

b)

setup()

c)

main()

d)

initialize()

35.

What does a PIR sensor detect?

a)

Humidity

b)

Light intensity

c)

Motion via infrared radiation

d)

Sound

36.

Which connectivity module provides cellular connectivity via 2G networks?

a)

Zigbee

b)

LoRa RA-02

c)

SIM800

d)

ESP32

37.

Which sensor converts mechanical stress or vibrations into electrical signals?

a)

PIR Sensor

b)

Piezoelectric Sensor

c)

Photodiode

d)

Gyroscope

38.

What is the function of actuators in IoT?

a)

Connect devices to the internet

b)

Process data

c)

Convert electrical signals into actions

d)

Collect environmental data

39.

What type of sensor measures changes in velocity or orientation?

a)
  • Accelerometer

b)

LDR Sensor

c)
  • Capacitive Sensor

d)

DHT22 Sensor

40.

Which of the following is NOT a key feature of IoT?

a)

Connectivity

b)

Real-time Monitoring

c)

Manual Processing

d)

Automation and Control