0% found this document useful (0 votes)
7 views4 pages

WS 5 Ans Key

The document covers chapters 4 and 5 on developing applications using Visual Basic and single board computers like Raspberry Pi. It includes multiple choice questions, fill-in-the-blanks, definitions, and explanations related to programming concepts such as error handling, event handling, and logical operators. Additionally, it discusses the functionality of servo motors and SONAR sensors in robotics projects.

Uploaded by

smjafar.rizvi20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

WS 5 Ans Key

The document covers chapters 4 and 5 on developing applications using Visual Basic and single board computers like Raspberry Pi. It includes multiple choice questions, fill-in-the-blanks, definitions, and explanations related to programming concepts such as error handling, event handling, and logical operators. Additionally, it discusses the functionality of servo motors and SONAR sensors in robotics projects.

Uploaded by

smjafar.rizvi20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Chapter-4 & 5 :

Developing Applications The City School


Single Board Computers PAF Chapter ANSWER
(Raspberry Pi) Prep Section
Pg 99-129 ICTech Class 8 KEY
Practice Worksheet 5– Term 2
Q.1 Multiple choice questions:

1) Visual Basic application source code is structured into ___________ with a .vb suffix.

(A) Functions (B) Procedures


(C) Modules (D) Variables

2) The code to create a form called Form1 will be placed in module file named ________________.
(A) Form1.Designer.vb (B) Form1.Exe
(C) Form1.pdf (D) Form1.Docx

3) Any code that has been defined by the developer to handle events from controls in the form will be
placed by Visual Studio into a module file called __________
(A) VB.Net.pk (B) Form1.vb
(C) Form1.Net (D) Form1.xlsx
4) When the user enters text value in one of the numeric fields (textbox), while doing the calculation the
program will give an “error” called __________
(A) Distinct Error (B) Synchronous Error
(C) Direct Error (D) Faulty Error
5) Logical Operators return ________.
(A) Boolean Result (B) Equal to Result
`(C) Not equal to Result (D) none of the above

Q.2 Fill in the blanks.

a) ERROR HANDLER is an essential procedure that helps make a program error-free.


b) FUNCTION is a type of procedure that returns a value that is passed on to the main procedure to finish
execution.
c) EVENTS are user actions like key press, clicks, mouse movements, etc.
d) LOOPS is a sequence of instructions that is repeated until certain condition is reached.
Q3 Write one advantage of using Modules in VB.Net.
Modules help programmers to organize their code. While creating a complex application Modules help save
space in your code and also assist to reuse of code like functions.

Q4. Define the following;


a. Error Handling in VB.Net.
Error Handling is an essential procedure that helps make a program error-free.
b. Event Handling.
Handling the event means you know what to do when something happens. For example; if the user clicks on the
Exit button, then the app will stop running.
c. Mouse Events.
Mouse events occur with mouse movements in forms and controls. Following are the various mouse events:
MouseDown, MouseEnter, MouseHover, MouseLeave, MouseMove.

Q5 Differentiate between the following:

Function Module

A function is a type of procedure that returns a value A Module is used to organize the code. Also to wrap
that is passed on to the main procedure to finish up variables, properties, events, and procedures of
execution. similar use.

Q6 What are logical operators? Name any two.


Logical Operators are similar to Boolean expression that return a boolean result. They are called “Binary” because
they acquire two operands. AND, OR, XOR and NOT are the Logical Operators.

Q7 Match the correct answer.

Correct
Mouse Events Description
Option
1 MouseUp A It occurs when a mouse button is pressed 1D
It occurs when the mouse pointer moves over the control 2C
2 Mouse Hover B
element
It occurs when the mouse pointer hovers over the control 3A
3 MouseDown C
element.
It occurs when the mouse pointer is over the control 4B
4 MouseMove D
element and the mouse button is released
Q8 Identify the type and meaning of the given operators.

Operator Type (Logical / Conditional) Meaning


Conditional Operator Greater and Equals to
>=

XOR Logical Operator One of the two conditions must be true but not both

CHAPTER-5 SINGLE BOARD COMPUTER – RASPBERRY PI


Q1. Fill in the blanks

1. PWM means Pulse Width Modulation


2. SONAR is an acronym for Sound Navigation and Ranging.
3. SONAR is used to measure the distance of any objective with the help of sound waves
4. Servo Motor rotates any object with precision
5. Bumble Pi is an educational Robot kit specially designed for beginners to have hands on experience to
mechanics, electronics and computer science

Q2. Give answer of the following questions about the SERVO MOTOR.

a) What is the purpose of using a SERVO motor?


A Servo Motor is an electrical device that is used to Push or Rotate an object with great precision.

b) What is a Servo Motor made up of?

It is just made up of simple motor and the servo mechanism.

Q3 Give answer of the following questions.

i. What is the purpose of using the SONAR sensor in the Bumble Pi Car project?

SONAR Sensor is used in the Bumble Pi car project to find the obstacles also to measure its distance.

ii. How does the SONAR sensor work?

A Sonar Sensor transmits the ultrasonic sound wave (which is inaudible to human ear, for 0.0001 seconds).
The transmitted wave will bounce back when it hits the object.
iii. Give few real life examples of its use.
iv. Sonar Sensor is used in driver-less cars, drones, automatic doors, lifts, radars, submarines and Bumble Pi
Car.

v. While connecting SONAR with Raspberry Pi, what equipment is needed?

We can use a Pi Shield.

Q4(a) A Servo motor works on which concept?

It works on the concept of Pulse Wave Modulation (PWM

Q4(b) Explain the working of PWM.

PWM works like On-Time and Off-Time of a signal.


On-Time: Represents the active time of the signal.
Off-Time: Represents the inactive time of a signal.

Q4(c)What equipment is used to connect the Servo Motor with Raspberry Pi.

We can use a Pi Shield.

Q5(a) What is a Bootloader.

For mobility purposes, we can also make a bootloader, which will automatically start the command or
program whenever the Raspbian OS will boot.

Q5(b) Give the Real Life examples of a bootloader.

Every device can have a bootloader, that tells the operating system to run which programs after the
startup/system boot. Following are the examples;

1. PC/Laptop: After the Operating System (Windows or MacOS) starts, the AntiVirus app runs
automatically.
2. Mobile Phone: First the OS (Android / IOS) loads, then other social media apps load in the
background, giving notifications etc.
3. Bumble Pi Robotic Car Kit: Raspbian OS loads, then the the SRC.py (program to control the car) runs
automatically.

Q6. Identify the following devices:

Device Name : Device Name :

SERVO MOTOR SONAR SENSOR

You might also like