0% found this document useful (0 votes)
11 views

Web Technologies Complete

Uploaded by

Gabriel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Web Technologies Complete

Uploaded by

Gabriel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

COMPUTING

✓ CCommunication Networks
✓ CComputational Thinking

Abstract
Web Technologies
Introduction to Programming
Algorithm
Robotics
Artificial Intelligence

Mr. Hatekah Gabriel Kwesi


[email protected]
0554106109 / 0200525979
1. WEB TECHNOLOGIES

Demonstrating the use of a Web Browser (Search Engine)

I. Identify the importance of the web in learning [Virtual Learning Environment (VLEs)];
II. Explore the use of open learning websites in the classroom;
III. Demonstrate the techniques for evaluating web pages.

THE WEB

The web, also known as the World Wide Web, is the collection
and interconnection of web pages that can be accessed using the
internet.

The web is a medium or a platform by which information can be


shared via the internet across the globe.

FUNCTIONS OF THE WEB

The web encompasses various functions and capabilities that


enables users to;

• Sending and receiving emails: The web provides a


convenient and accessible platform for sending and
receiving emails. It has transformed communication,
enabling individuals or businesses to stay connected,
exchange information, and collaborate efficiently.

• Instant messaging: Instant messaging is a form of real –


time communication that allows individuals to exchange text
– based messages instantly over the internet. It enables users to have interactive conversations with
others who are online and actively participating in the messaging service.
Examples include: Microsoft terms, Google Chat, WhatsApp Web, Facebook Messenger, Telegram Web,
Slack etc.

• File conversion: The web allows users to convert files from one format to another. This capability is
particularly useful when one needs to transform a file into a different format that is compatible with a
specific software or device. Such files include images, audio, video, DOC, PDF and others.

• File scanning: File scanning is indeed an essential function provided by various web – based services to
ensure the security and integrity of files. It involves the use of scanning technology to detect and identify
potential threats, weakness or flaw, or malicious content within files.
1
Page
• File editing: File editing is a common function provided by numerous web – based platforms and
applications, allowing users to modify and manipulate various types of files directly from their web
browsers.

• Online learning (Virtual learning): It involves the use of digital technologies and the internet to deliver
educational content, courses, and training programs.

• Downloading of movies, music, software, and other documents: The web allows users to obtain
digital files from various sources and save them to their local devices for offline access.

• Marketing and advertisement of goods and services: The Web has become a crucial platform for
marking and advertising goods and services. It provides businesses with a range of tools and strategies tl
reach and engage with their target audiences.

• E – Commerce (i.e., buying and selling over the internet): The web has transformed/revolutionized
commerce by providing a platform for online shopping and transactional activities. E – commerce
websites allow businesses to showcase and sell products or services directly to customers, facilitating
secure online transactions. etc.

WEB BROWSER

A Web browser is an application software used to access and view websites on the internet. Some examples
of commonly used web browsers are

SEARCH ENGINES

A search engine is a website that allows users to search the internet. To do this, users enter keywords into a
search field, and the search engine looks through its index to find relevant web pages and display them in
a list. Some examples of commonly used web browsers are
2
Page
INTERNET VS THE WEB

The terms "internet" and "web" are often used interchangeably, but they refer to different concepts:

1. Internet: The internet is a global network of interconnected devices and networks. It is a vast
infrastructure that enables communication and data transfer between computers worldwide. The internet is
built on a set of protocols known as TCP/IP (Transmission Control Protocol/Internet Protocol), which
allows devices to connect and exchange information. It encompasses various technologies, including wired
and wireless connections, routers, servers, and other networking components.

2. Web (World Wide Web): The web, or World Wide Web, is an application that runs on top of the internet.
It is a system of interconnected documents and resources linked through hyperlinks. The web relies on the
HTTP (Hypertext Transfer Protocol) protocol to transmit and retrieve information. It is primarily accessed
through web browsers, such as Chrome, Firefox, Safari, or Edge. The web enables users to access websites,
web pages, multimedia content, and various online services.

I. VIRTUAL LEARNING ENVIRONMENT (VLEs)

A virtual Learning Environment is a digital platform or system that facilitates online learning and teaching.
It provides a range of tools and resources to support student engagement, collaboration, and knowledge
sharing. OR

Virtual Learning Environment is an online – based classroom platform that allows participants (both
teachers and learners) to communicate with each other over the internet.

A VLE typically includes features such as:

▪ Courses materials and resources;


▪ Discussion forums and chat rooms;
▪ Quizzes, assessment, and grading tools;
▪ Student profiles and portfolios;
▪ Video conferencing and live streaming;
▪ Virtual classrooms and sharing tools;
▪ Content creation and sharing tools etc.

Examples of VLEs

✓ Learning Management Systems (LMS) like Moodle, Blackboard, and Canvas;


✓ Online Course Platforms like Udemy, Coursera, and edX;
✓ Virtual Classrooms like Zoom, Google Meet, Edmodo, and Skype;
✓ Social Learning Platforms like LinkedIn Learning and Facebook Education etc.
3
Page
Here's why a VLEs is important:

1. Accessible Learning: A VLE allows students to access learning materials and resources from anywhere,
at any time, as long as they have an internet connection. They can learn at their own pace and review the
materials whenever they need to.

2. Communication and Collaboration: With a VLE, teachers and students can communicate and collaborate
easily. They can ask questions, participate in discussions, and work on projects together, even if they are not
physically in the same place.

3. Organized Course Content: A VLE helps teachers organize their course materials and resources in one
place. Students can easily find and access the materials they need for their studies, such as lecture notes,
videos, and assignments.

4. Assessments and Feedback: Teachers can create quizzes and assignments on a VLE to assess students'
understanding of the subjects. Students can submit their work online, and teachers can provide feedback and
grades electronically.

5. Progress Tracking: A VLE allows teachers and students to track their progress. Teachers can see how
students are doing, which areas need improvement, and provide personalized support. Students can also
monitor their own progress and take steps to improve their learning.

6. Flexibility and Personalization: A VLE offers flexibility in learning. Students can choose when and
where they want to study, which helps them fit their studies into their busy schedules. It also allows for
personalized learning, as students can work at their own pace and focus on areas they find challenging.

7. Cost-Effective: Using a VLE can be cost-effective for educational institutions. It reduces the need for
physical classrooms and resources, such as textbooks, as most learning materials can be provided digitally.

Overall, a VLE makes learning more accessible, interactive, and organized. It allows for effective
communication, collaboration, and assessment. With the flexibility it provides, students can learn at their
own pace and teachers can support their individual needs.
4
Page
II. OPEN LEARNING WEBSITES IN THE CLASSROOM

OPEN LERANING WEBSITES are sites that contain different types of educational courses and learning
materials available online for use and are downloaded for free. They provide many videos, audios, articles,
and e – books to help students increase their knowledge and then participate in online tests. These open
learning websites can be accessed at the convenient of the students and specific courses can be learnt at no
cost. Some examples of open learning websites used in the classroom includes Khan Academy, Coursera,
edX, Saylor, Alison etc.

Let’s briefly discuss these open learning websites listed above.

➢ Khan Academy: Khan Academy offers a vast collection of video lessons, practice exercises, and
assessments across various subjects, including math, science, history, and more. It provides a
personalized learning experience, allowing students to learn at their own pace. Khan Academy is widely
used for supplemental instruction, test preparation, and filling gaps in knowledge.
The URL to access Khan Academy open learning website is https://www.khanacademy.org/

➢ Coursera: Coursera partners with universities and organizations worldwide to offer online courses on a
wide range of subjects. It provides high-quality video lectures, interactive quizzes, and assignments.
Coursera courses are often self-paced, allowing learners to access the content at their convenience.
While some courses are free, others require payment for certification.
The URL to access Coursera online open learning website is https://www.coursera.org/

➢ edX: edX is a platform that collaborates with renowned universities and institutions to offer free online
courses. It provides a diverse range of subjects, from humanities to sciences. edX offers interactive
learning experiences, including video lectures, quizzes, and discussion forums. Learners can choose to
audit courses for free or pay for a verified certificate.
The URL to access edX open learning website is https://www.edX.org/

➢ Saylor Academy: Saylor Academy offers free college-level courses across various disciplines, including
business, computer science, and humanities. The courses are self-paced and structured with
comprehensive modules, readings, and assessments. Saylor Academy focuses on providing accessible
education and offers transferable college credit for some courses.
The URL to access Saylor Academy online open learning website is https://www.saylor.org/

➢ Alison: Alison provides free online courses and certifications in various areas, such as technology,
business, health, and language learning. It offers interactive multimedia-based lessons, assessments, and
practical exercises. Alison's courses are designed to develop practical skills and enhance employability.
The URL to access Alison online open learning website is https://www.alison.com/

Advantages Of Online Open Learning Websites

1. It allows students anywhere in the world to access learning materials at any time, and repeatedly.
2. Open learning educational materials are easy to distribute widely at little or no cost.
3. Multimedia materials such as videos that accompany lessons help students to learn with ease.
5

4.
Page

Information may be disseminated rapidly through the use of the internet.


5. Open learning educational materials can be improved quickly though direct editing by users or
through solicitation and incorporation of user feedback.
6. It allows instructors to use existing materials, adapted for a class, and to modify for others to use.

III. techniques for evaluating web pages.

A web page is a document or information resource that is accessible via the internet or a local network. It is
typically displayed in a web browser and can contain various elements such as text, images, videos, Audio
files, Hyperlinks, forms, scripts, style sheets.

A web page is usually written in a hypertext markup language (HTML) and may include additional
technologies like CSS (Cascading Style Sheets) for layout and design, and JavaScript for dynamic effects
and functionality.

Types of Web pages

1. Personal Websites: Personal websites are created by individuals to showcase their personal information,
interests, and accomplishments. These websites often include details about the individual's background,
resume, hobbies, blog posts, and contact information. Personal websites can serve as online portfolios or
platforms to share personal thoughts and experiences.

2. Portfolio Websites: Portfolio websites are designed to showcase an individual's or a professional's work
or projects. These websites often feature a collection of samples, such as artwork, design projects, writing
samples, or photography, to demonstrate skills and expertise. Portfolio websites are commonly used by
artists, designers, photographers, and freelancers to showcase their work to potential clients or employers.

3. Small Business Websites: Small business websites are created by small businesses to establish an online
presence and promote their products or services. These websites typically provide information about the
business, its offerings, contact details, and may include features like online booking, customer testimonials,
or e-commerce functionality. Small business websites aim to attract and engage potential customers.

4. E-commerce Websites: E-commerce websites are designed for online businesses that sell products or
services. These websites include features like product catalogs, shopping carts, secure payment gateways,
and order management systems. E-commerce websites allow customers to browse, select, and purchase
products online. They often include product descriptions, images, customer reviews, and other relevant
information to facilitate the buying process.

5. Blog Websites: Blog websites focus on sharing regular blog posts or articles on specific topics. These
websites are updated frequently with new content, and readers can engage with the content through
comments or social media sharing. Blog websites cover a wide range of topics, including personal
experiences, travel, fashion, cooking, technology, and more. They can be created by individuals,
organizations, or companies as a platform to share information, opinions, and stories.
6
Page
Web pages must be evaluated to establish the quality and reliability of the information contained in the
pages. There are five (5) techniques that can be used to evaluate web pages. These techniques are:

1. Accuracy: Check if the information on the web page is correct and reliable. Look for evidence, sources,
or references that support the claims made. Compare the information with other trusted sources to ensure its
accuracy.

2. Credibility: Evaluate the credibility of the web page and its author or organization. Consider the expertise,
qualifications, and reputation of the author or the website. Look for signs of bias or any potential conflicts of
interest that may affect the reliability of the information.

3. Content: Assess the overall quality and relevance of the content provided on the web page. Look for clear
and well-structured information that is easy to understand. Check if the content meets your needs and if it
covers the topic comprehensively.

4. Current: Consider the timeliness of the information. Look for the publication or update date on the web
page to ensure that the information is current. Depending on the topic, it's important to have up-to-date
information to avoid relying on outdated or obsolete content.

5. Functionality: Evaluate the functionality of the web page. Check if it is easy to navigate, if the links work
properly, and if the page loads quickly. A well-designed and user-friendly web page enhances the overall
user experience and indicates a higher level of professionalism.

TEST HUB
OBJECTIVE TYPE QUESTION

1. A Virtual Classroom is ….. 4. Which of the following is an example of a


a. Learners using technology. search engine?
b. YouTube tutorials. a. Microsoft Teams
c. An online learning environment that is access b. Google Chat
through the internet. c. WhatsApp Web
d. None of these d. Google Search

2. Which protocol is primarily used by the web? 5. What is the difference between the internet
a. TCP/IP and the web?
b. HTTP a. The internet is a global network, while the web
c. FTP is an application running on top of it.
d. SMTP b. The internet is used for sending and receiving
emails, while the web is used for instant
3. What is the purpose of a web browser? messaging.
a. Access and view websites c. The internet uses HTTP protocol, while the web
b. Search the internet uses TCP/IP protocol.
c. Secure online transactions d. The internet is accessed through web browsers,
d. Convert files from one format to another while the web is accessed through search engines.
7
Page
6. What is a Virtual Learning Environment d. Marketing and advertising goods and services
(VLE)?
a. A digital platform for online learning and 13. Which of the following is an example of a web
teaching browser?
b. A web browser used for accessing websites a. Khan Academy
c. A protocol for file conversion b. Coursera
d. An application for instant messaging c. Chrome
d. Moodle
7. What is the importance of a VLE in learning?
a. Accessible learning from anywhere, anytime 14. How does a VLE support communication and
b. Marking and advertising goods and services collaboration?
c. Conversion of files from one format to another a. By providing video conferencing and live
d. Buying and selling goods online streaming capabilities
b. By allowing file editing and manipulation
8. Which of the following is an open learning directly from the browser
website? c. By offering a platform for buying and selling
a. Microsoft Teams goods online
b. Khan Academy d. By converting files from one format to another
c. Google Meet
d. Zoom 15. Which of the following is a feature of a VLE?
a. Courses materials and resources
9. What resources are typically available on open b. Instant messaging
learning websites? c. File scanning and editing tools
a. Courses materials and resources d. Downloading movies and music
b. Sending and receiving emails
c. File scanning and editing tools 16. A website can be considered unreliable if
d. Marketing and advertising tools a. it is linked to an educational institution
b. it is mostly subjective
10. What is the purpose of a search engine? c. it provides support for its argument
a. Access and view websites d. it has a mission statement.
b. Convert files from one format to another
c. Search the internet for relevant web pages 17. Web – white – boarding allows a user to do
d. Provide a platform for online shopping the following except
a. enabling both teachers and students to work in
11. Which protocol is primarily used for real-time real – time.
communication over the internet? b. emulating writing or drawing on a blackboard.
a. TCP/IP c. adding audio.
b. HTTP d. saving contents for future presentations.
c. FTP
d. Instant messaging 18. “A combination of both face – face, traditional
classroom methods with e – learning to create
12. What is the function of file scanning on the a ‘hybrid’ approach to teaching. “The quote
web? describes what type of e – learning?
a. Sending and receiving emails a. Blended Learning
b. File conversion from one format to another b. Distance Learning.
1

c. Detecting potential threats or malicious content c. Synchronous Learning.


Page

within files d. Asynchronous Learning.


19. Which of the following scenarios best 21. A website can be considered unreliable if
illustrates the concept of interoperability? a. it is linked to an educational institution.
a. Teachers can easily communicate with students b. it is mostly subjective.
and parents/guardians online. c. it provides support for argument.
b. Several users can simultaneously access the d. it has a mission statement.
same cloud – based application.
c. Group members can add information to a class 22. You can determine whether a website is
work and edit one another’s work. reliable by looking at the author. You may find
d. Students can access content from multiple that a site is reliable if the author
online sources with a single log – in. a. is an expert in the subject.
b. has links to several unidentifiable sites or
20. It is important to check the reliability of a organisations.
website because……… c. has a short description of his/her background.
a. Someone is not always there to evaluate and d. has many advertisements on his/her website.
validate all sites posted on the web.
b. websites can be written by anyone on any 23. Many reliable sites will have
subject whether the person is an expect in the a. slow loading sites.
subject or not. b. search tips and a help link.
c. not everything posted on the web is true or c. difficult navigating to a selected link.
accurate. d. organizational issues.
d. all the above.

ESSAY TYPE QUESTIONS

1. a) Define the following terms;


i. Web ii. Internet iii. Web browser iv. Search engine
b) State and explain any four (4) importance of the web.
c) Give four (4) examples each of the following:
i. Search engine ii. Web browser.
d) Differentiate between the following concepts:
i. The Web and the Internet;
ii. A Search engine and a web browser.

2. a) Write down the full meaning of the following acronyms:


i. TCP ii. HTTP iii. FTP
iv. SMTP v. WWW vi. IP

b) Study the diagrams below carefully and answer the questions that follows.

A B C D E

i. The applications software above are examples ………………..


2
Page

ii. Identify the parts labelled A, B, C, D, and E.


3. a) Explain the term Virtual Learning Environments.
b) Identify any four (4) impacts of Virtual Learning Environments on learners.
c) State four (4) characteristics/features of Virtual Learning Environments.
d) Write four (4) benefits/importance of Virtual Learning Environments.

4. a) Highlight three (3) open learning websites in the classroom.


b) i. Why is it important to evaluate webpages. Outline any four (4)
ii. Define the following terms:
α. open learning websites β. E– learning.
c) Differentiate between a website and web pages.
d) Discuss the techniques that can be used to evaluate web pages.
1
Page
2. INTRODUCTION TO PROGRAMMING

Show An Understanding Of The Concept Of Programming

I. Understand the basic terminologies of programming;


II. Know the data types in programming;
III. Understand how to properly use a data type;
IV. Distinguish between constants and variables;
V. Understand the benefits of using variables in programing.

Introduction

Programming is the process of designing, writing, testing, and maintaining the source code of computer
programs. This source is written in one or more programming languages, which are used to communicate
with a computer and instruct it to perform specific tasks.

Programming involves:

• Analysis: Identifying a problem or need and defining the requirements.


• Design: Creating a plan or algorithm for the program.
• Implementation: Writing the code in a programming language.
• Testing: Verifying that the program works correctly and fixing errors.
• Maintenance: Updating, modifying, and expanding the program as needed.

Programming Languages

• High – Level languages (e.g., Python, Java, C++)


• Low – Level Languages (e.g., Assembly)
• Scripting Languages [e.g., JavaScript, PHP (Hypertext Preprocessor Programming)]
• Functional Programming Language (e.g., Haskell, Lisp)
• Object – Oriented Programing Languages (e.g., C++, Java)

I. Understand the basic terminologies of programming;

PROGRAMMING TERMINOLOGIES AND THEIR EXPLANATION

1. Abstraction: A simplified code or technology such as converting a video file from one
that is use without knowing how it works. format to another.
2. Algorithm: An algorithm is a set of 3. API: Application Programming Interface
instructions or rules designed to solve a (API) is a set of rules, routines, and protocols
definite problem. The problem can be simple to build software applications. APIs help in
like adding two numbers or a complex one, communication with third party programs or
services, which can be used to build different conditional expressions, and relational
software. Companies such as Facebook and expressions.
Twitter actively use APIs to help developers 9. Bug: A bug is a general term used to denote an
gain easier access to their services. unexpected error or defect in hardware or
4. Argument: Argument or arg is a value that is software, which causes it to malfunction. Even
passed into a command or a function. For though bugs are often considered to be
example, if SQR is a routine or function that insignificant computer glitches, there have
returns the square of a number, then SQR (4) been instances where bugs have caused life-
will return 16. Here, the value 4 is the threatening conditions and led to major
argument. Similarly, if the edit is a function financial losses. This makes it imperative to
that edits a file, then in edit myfile.txt, invest in the process of finding bugs before
‘myfile.txt’ is the argument. programs are rolled out for their application.
5. Array: Arrays are lists or groups of similar This process is known as testing.
types of data values that are grouped. All 10. Char: Character (char) is a display unit of
values in the array are of the same data type information equal to one alphabetic letter or
and are only differentiated by their position in symbol. The value of a char variable could be
the array. For example, the age of all students any one-character value, such as ‘a’, ‘1’, ‘$’
in a class can be an array as they will all be and ‘X’. This definition of character relies on
numbers. Similarly, the name of every student the general definition of a character as a sole
in a class will be an array as they will all be of unit of written language. However, char as an
the character data type. abbreviation is a reserved keyword in
6. ASCII: American Standard Code for languages such as C, C++, C#, and Java.
Information Interexchange (ASCII) is a 11. Class: In Object-Oriented programming, a
standard that assigns letters, numbers and class refers to a set of related objects with
other characters different slots, available in the common properties. Classes and the ability to
8-bit code. The total number of slots available create new classes render OOP a powerful and
is 256. The ASCII decimal number is derived flexible programming model. For example,
from binary, which is assigned to each letter, there might be a class called shapes which
number, and character. For example, the ‘$’ contains objects which are triangles,
sign is assigned ASCII decimal number 036, pentagons, square and circle.
while the lowercase ‘a’ character is assigned 12. Code: Code or source code is a term used to
097. describe a written set of instructions, written
7. Backend: Backend is another term used for using the protocols of a particular language,
background in programming. A backend task such as Java, C or Python. The code can also
is the one that is performed in the background be used informally to describe text written in a
with the user’s direct interaction. Similarly, a specific language. There are instances where
backend developer is a person who designs references to the code are made for different
programs that process data and perform tasks languages, such as ‘PHP Code’, ‘HTML
that users don’t directly see. Code’, ‘Java Code’ or ‘CSS Code’.
8. Boolean: A Boolean expression or Boolean 13. Command-line interface: The command-
logic is an expression used for creating line interface is a user interface based on the
statements that are either TRUE or FALSE. text. The UI is used to view and manage
Boolean expressions use AND, OR, XOR, computer files. Command-line interfaces are
NOT and NOR operators with conditional also called command-line user interfaces,
statements in programming, search engines, console user interfaces and character user
1

algorithms, and formulas. Boolean expressions interfaces. During the early 1960s and through
Page

are also called comparison expressions, the 1970s and 1980s, the command line
interface was the primary means of interaction understand its meaning, and how the process
with most computers on terminals. should be continued. Even though they are
14. Compilation: The process of creating an important, they are optional and may be used
executable program through code written in a depending on the nature of the programming
compiled programming language is called language.
compilation. Through compiling, the computer 19. Endless loop: An endless loop or infinite loop
can understand and run the program without is a continuous repetition of a program
using the programming software used to create snippet, which is everlasting. This occurs
it. A compiler is a program that translates majorly due to conditional operators and
computer programs written using letters, functions which redirect the code back to the
numbers, and characters into a machine snippet, making it endless.
language program. An example of a compiler 20. Exception: A special, unexpected and
in C++. anomalous condition encountered during the
15. Conditionals: Conditionals, conditional execution of a program is known as an
statements, and conditional expressions are exception. It can also be termed as an error or
features of programming language, which help a condition that alters the way of the program
the code make a choice and result in either or the microprocessor to a different path. An
TRUE or FALSE. These perform different example of an exception can be the case when
actions depending on the need of the a program tries to load a file from the disk, but
programmer, and multiple conditions can be the file does not exist. The exceptions must be
combined into a single condition, as long as handled and eradicated in the program code to
the final value of the condition is either TRUE avoid any fatal error.
or FALSE. Examples of conditional 21. Expression: An expression is a legal grouping
statements are ‘IF’, ‘IF-Else’, ‘While’ and of letters, symbols, and numbers being used to
‘Else-If’. represent the value of one or more variables.
16. Constants: A constant (also known as Const) Expressions are highly used in a number of
is a term used to describe a value that does not programming languages and many other
change throughout the execution of the programs, with each having its own set of
program, unlike a variable. Constant cannot be legal and illegal expressions. Every expression
altered and will remain fixed, and a constant contains one or more operands (objects being
can be a number, character, and string. manipulated) and operators (symbols
17. Data types: A data type is the classification of representing actions). For example, in the
a particular type of data. We as humans can expression A+B-C, A, B and C are operands
understand the difference between a name and while + and – are operators.
a number, but the computer cannot. The 22. Framework: Framework in programming is a
computer uses special internal codes to foundation with a specified level of
distinguish between different types of data it complexity that may be altered by the
receives and processes. The most common programmer, making use of their code. A
data types include integer type which are framework might include different software
numbers, a floating-point number data type libraries, APIs, compilers and much more. In
which are decimal based numbers, Boolean simpler terms, a framework provides a
values which are TRUE or FALSE and favorable environment for a certain type and
character data type which is alphabets. level of programming for a project. A
18. Declaration: A statement that describes a framework allows the developers to bypass the
variable, function or any other identifier is general necessities and focus on more project-
2

called a declaration. A declaration helps the related specifics.


Page

compiler or interpreter identify the word and


23. Front-end: The Front-end is the user language are ‘return’, ‘while’, ‘if’, ‘static’,
interface of a computer or any device. For ‘continue’ and ‘default’.
example, any operating system provides users 28. Loop: A loop is a sequence of instructions that
with the ease of navigation. A program or OS repeat the same process over and over until a
is considered good if the UI or Front-end is condition is met and it receives the order to
easy to use and seamless to navigate. Front- stop. In a loop, the program asks a question,
end developers are the programmers who and if the answer directs the program to
design and develop the user interface of a perform an action, the action is performed, and
device. the loop runs again, performing the same task.
24. Hardcode: In computer programming, the It runs until the answer is such that no action
term hard code or hardcode is used to describe is required and the code can proceed further.
code that is not likely to change. Hardcoded Loops are considered one of the most basic
features are built into hardware or software in and powerful concepts in programming.
such a way so that they cannot be modified 29. Low-level language: A low-level language is
later on. For example, if font size 10 is a language that is very close to machine
hardcoded in the software, then it might not language and provides a little abstraction of
change for a long time. programming concepts. Low-level languages
25. High-level language: A high-level language are closer to the hardware than human
(HLL) is a programming language that lets the languages. The most common examples of
developer write programs irrespective of the low-level languages are assembly and machine
nature or type of computer. But if a computer code.
has to understand a high-level language, it 30. Machine language: Also known as machine
should be compiled into a machine language. code, machine language is a lowest-level
HLLs are considered high-level because they programming language consisting of binary
are in close proximity to human languages and digits or bits that are read by computers.
further from machine languages. High-level Machine language is the only language
languages include BASIC, C, C++, Pascal, understood by computers. As it consists of
Prolog, and FORTRAN. only numbers, they cannot be comprehended
26. Iteration: Iteration is a single pass through a by humans. Therefore, programmers write
set of operations that deal with code. One form code in the high-level language, which is then
of iteration in computer programming is via translated into assembly language or machine
loops. A loop will repeat a certain segment of language by a compiler, which is then
code until a condition is met and it can converted to a machine language by an
proceed further. Each time the computer runs a assembler.
loop, it is known as an iteration. In simple 31. Markup language: A markup language is a
terms, iteration is the process to repeat a relatively simple language that consists of
particular snippet of code over and over again easily understood keywords and tags, used to
to perform a certain action. format the overall view of the page and its
27. Keywords: Words that are reserved by a contents. The language specifies codes for
programming language or a program as they formatting the layout and style of a page,
have special meaning are known as keywords. within a text file only. The most common
These keywords are reserved to perform markup languages are Hypertext Markup
certain tasks, and they can be either Language (HTML), Extensible Markup
commands or parameters. Each programming Language (XML) and Standard Generalized
language has a set of reserved keywords (also Markup Language (SGML).
32. Null: Null defines the lack of any value
3

known as reserved names) which cannot be


Page

used as variable names. Some keywords in ‘C’ whatsoever. A null character is a programming
code, which represents a character with no 39. Program: A computer program is termed as
value, missing value or the end of a character an organized collection of instructions, which
string. If we state $val1= ”” and $val2= “1”, when executed perform a specific task or
$val1 has a null value. function. A program is processed by the
33. Object-Oriented Programming: Object- central processing unit (CPU) of the computer
oriented programming (OOP) is a model before it is executed. An example of a program
defined by programmers that revolve around is Microsoft Word, which is a word processing
objects and data rather than ‘actions’ and application that enables users to create and
‘logic’. In OOP, not only the data type of a edit documents. The browsers that we use are
data structure is defined, but also the types of also programs created to help us browse the
functions that can be applied to it. Through internet.
this, the data structure becomes an object that 40. Runtime: Runtime or runtime is the time
consists of both data and functions. Languages period during which a program is, in fact,
that use OOP concepts are Java, Python, C++, running on a computer. If an operation occurs
and Ruby. at ‘runtime’, it occurred when a program is
34. Objects: An object is a combination of related running or the moment at which the program
variables, constants and other data structures begins to run. Also known as execution time,
which can be selected and manipulated the runtime is part of the life cycle of the
together. An object can include shapes that program, and it denotes the time between
appear on a screen or the age of students in a when the program begins running and until it
school. is closed by the OS or the user.
35. Operand: An operand is a term used to 41. Server-side: When procedures and processes
denote the objects which can be manipulated are performed on the server, they are deemed
using different operators. In the expression server-side. On the other hand, the client-side
‘A+F+Q’, ‘A’, ‘F’ and ‘Q’ are operands. is at the end of the user. Many programming
36. Operator: An operator is a term used to languages are designed for server-side
denote the object which can manipulate programmings such as PHP, Perl, and ASP.
different operands. In the expression ‘A+F-Q’, With the internet boom, almost all websites
‘+’ and ‘-‘are operators. Examples of different make use of both server-side and client-side
operators are + (addition), -- (decrement), = processing. An excellent example of a server-
(equals), != (not equal) and >= (greater than or side script is a search engine.
equal to). 42. Source data: Source data or data source is
37. Package: A package is an organized module the key location from which data is used in the
of related interfaces and classes. Packages are program. The source data can come from a
used to organize classes that belong to the database, spreadsheet or even a hard-coded
same category or provide related functionality. data location. When a program is executed to
38. Pointer: In programming, a pointer is a display data in a table, the program retrieves
variable that contains the address of a location the data from its source and then presents it in
in the memory. The location is the the arrangement as defined in the code.
commencing point of an object, such as an 43. Statement: In programming, a statement is a
element of the array or an integer. Using single line of code written legally in a
pointers improves the performance of the programming language that expresses an
program as it is cheaper in time and space to action to be carried out. A statement might
copy and dereference pointers than to copy have internal components of its own, including
and access the data to which the pointer is expressions, operators and functions. An
4

referring. example of a statement is A = A + 5. A


Page

program is nothing but a sequence of one or


multiple statements. Learn more about broken into tokens; ‘John’, ‘Thomas’ and
statements here ‘Wood’. The programmer can then go on to
44. Syntax: Similar to human languages, use only the portion or token they wish to.
programming languages have their own set of Tokens are classified into keywords,
rules on how statements can be conveyed. The identifiers, literals, operators, and punctuators.
set of these rules is known as syntax. While a 46. Variable: A variable is a location that stores
number of programming languages share temporary data within a program which can be
many features, functions, and capabilities, modified, store and display whenever need.
they differ in syntax. Without the proper use of For example, if we have an integer variable
the syntax, one cannot write an executable with a name XYZ and it stores a value 10. If
program, and a wrong syntax will lead to a the variable is again initiated with a different
plethora of errors. value, it will store the new value. So if
45. Token: A token is the smallest individual unit XYZ=9 is implemented, the variable location
in a program, often referring to a portion of a of XYZ will discard the value 10 and store the
much larger data piece. For example, if a new value, which is 9.
person’s name is John Thomas Wood, it can be

II. Know the data types in programming;


III. Understand how to properly use a data type;

What is a data type? A data is a classification of data which is stored into a variable for processing by
the program. The data type indicates which type of data must be stored into a variable and operations to be
done or executed on the data. There are different types of data types used in programming. Explore the table
below which describes the use data types.

DATA TYPE DESCRIPTION SAMPLE DATA EXAMPLE OF USE


Integer (int) Represents whole numbers 1, Commonly used for
without fractional parts -5, counting and to keep
or 100. quantities of stock
available
Floating Point (float) Represents floating-point numbers 3.14 Commonly used for
with decimal fraction. 93.51 monetary values such as
or -0.5. prices of goods and
services
Boolean (bool) Represents a logical value that can YES / NO Used for questionnaires
be either true or false. TRUE / FALSE with only two options.
1/0
Character (Char) Represents a single character, 'a', Can be used for holding
'B', or '$'. initials of names.
String (Str) Represents a sequence of “Hello World” Can be used to store
characters, which includes letters, “TM666” names, addresses, and
numbers, or other types of “Box 33” locations.
5

characters.
Page
IV. Distinguish between constants and variables;

Constants and variables are both fundamental concepts in programming, but they differ in their
characteristics and usage. Here's a distinction between constants and variables:

Constants:

• Constants are values that do not change during the execution of a program. They are fixed and
immutable.
• Once a constant is declared and assigned a value, it cannot be modified or reassigned.
• Constants are typically used to represent fixed values that are known and required to remain constant
throughout the program.
• Constants are usually given meaningful names and are often written in uppercase to distinguish them
from variables.
• Examples of constants include mathematical constants like pi (3.14159) or predefined values such as
the number of days in a week (7).

Variables:

• Variables are placeholders for storing and manipulating data. They can hold different values during
the execution of a program.
• Variables are mutable, meaning their values can be changed or reassigned throughout the program.
• Variables are typically used to store data that can vary or change during the execution of a program.
• Variables are declared with a specific data type and given a name, which is used to refer to the stored
value.
• Examples of variables include storing user input, intermediate calculation results, or data retrieved
from a database.

5𝑥 + 4𝑦 − 7
Here, the variables are x and y and 9 represents constant.

There are three different ways to use a variable in a program. They are:

1. Declaring a variable: This involves specifying the name and data type of a variable. It informs the
compiler or interpreter about the existence of the variable in the program. For example, in many
programming languages, you would declare a variable like this: int age;. This statement declares a
variable named "age" of type integer.

2. Assigning a value into a variable: Assigning a value or data into a variable is the same as storing a
data into the variable. There are two ways of doing that and they are

▪ Variable Initialization: This is the process of assigning an initial value to a variable at the
time of declaration. For example: int age = 25;. Here, the variable "age" is declared and
assigned the value 25.
6
Page
▪ User Input: You can also assign a value to a variable by accepting input from the user during
program execution. This is often done using functions or methods provided by the
programming language to read input.

3. Accessing the value stores in the variable: Once a value is assigned to a variable, you can access
and use that value in various ways within the program. This can include performing calculations,
displaying the value, or using it in conditional statements.

VI. Understand the benefits of using variables in programing.

Using variables in programming offers several benefits, including:

1. Data Storage: Variables provide a means to store and organize data within a program. They allow
you to assign values to meaningful names, making it easier to understand and manage data
throughout the program.
2. Data Manipulation: Variables enable you to perform calculations, transformations, and
manipulations on data. By storing data in variables, you can modify and update values as needed,
facilitating complex computations and data processing.
3. Code Readability and Maintainability: Variables improve code readability by using descriptive
names that convey the purpose and meaning of the stored data. This makes the code easier to
understand, maintain, and debug, both for the original programmer and others who may work on the
code in the future.
4. Code Reusability: Variables allow you to reuse data throughout the program. Instead of hard-coding
values, you can assign them to variables and reuse those variables in multiple places. This promotes
code modularity and reduces redundancy, making the code more efficient and easier to update.
5. Flexibility and Adaptability: Variables provide flexibility in handling varying data. They can hold
different values at different times during program execution, allowing for dynamic behavior and
adaptability. This is particularly useful when dealing with user input or changing data requirements.
6. Parameter Passing: Variables can be used to pass data between different parts of a program, such as
functions or modules. By passing variables as parameters, you can share and exchange data, enabling
modular and reusable code structures.
7. Context and State Management: Variables help maintain context and state within a program. By
storing data in variables, you can track and remember the program's progress, remember previous
calculations, or save user input for future use.
8. Code Abstraction: Variables abstract the underlying data by providing a symbolic representation.
This allows programmers to work with conceptual values rather than dealing with raw data directly,
making the code more intuitive and easier to understand.
9. Efficient Memory Usage: Variables allow for efficient memory allocation and utilization. They
provide a way to reserve memory space based on the data type, ensuring appropriate storage
requirements and avoiding unnecessary memory consumption.
7
Page
TEST HUB
OBJECTIVE TYPE QUESTION

1. ……… is a programming language that allows


the programmer to use objects to accomplish 6. The language understood by a computer
its goals. without translation is called
a. Structured programming language. a. Command language
b. Object – oriented programming language. b. High – level language
c. Top – down programming language. c. Assembly language
d. Bottom – up programming language. d. Machine language

2. Each object used in an object-oriented 7. …… refers to the process of locating and


programming is created from…. removing the errors in a program.
a. class b. object a. Analyzing b. Correcting
c. instant d. user c. Debugging d. Executing

3. A sequence of instructions in a computer 8. What are the entities whose values can be
language to get the desired result is known as changed?
a. an algorithm b. a decision table a. Constants b. Variables
c. a program d. none of the above c. Modules d. Tokens

4. Which type of errors is flagged by compilers? 9. Which of the following are types of integers?
a. Logical errors b. Syntax errors a. Shorts b. Int.
c. Both (a) and (b) d. None of these c. Long d. All the above

5. A program that converts a high-level program 10. Which keyword is used to prevent any
to as set of instructions that can run on a changes in the variable withing a C program?
computer is called a/an a. Immutable b. Mutable
a. Compiler b. Editor c. Cont. d. Volatile
c. Debugger d. none of the above

ESSAY TYPE QUESTIONS

1. Define the following programming terms.


i. Data type ii. Variable iii. Constant

2. State three (3) benefits of using a variable in a programming code.

3. a) Explain the term programming.


b) List and explain the use of three (3) data types in programming.
4. Copy and complete the table below.

DATA TYPE DESCRIPTION SAMPLE DATA


Integer (int)
Floating Point (float) Represents floating-point numbers with decimal
fraction.
Represents a logical value that can be either true
or false.
Represents a single character, 'a',
'B', or '$'.
String (Str)
9
Page
3. ALGORITHM

Analyse the correct step -by – step procedure in solving any real – world problem.

I. Differentiate between sequence, selection and iteration structure;


II. Represent an algorithm of a program using simple English language and pseudocode;
III. Differentiate between an algorithm, abstraction and decomposition;
IV. Perform linear search.

INTRODUCTION

In our daily lives, we follow a set of instructions to complete a variety of tasks. Instructions are so important
that if you do not pay attention to them, things will not go as planned. Likewise, a computer needs to follow
a set of instructions to complete its tasks successfully. These sets of instructions are termed as Algorithms.

An algorithm is a set of steps or instructions used to perform a specific task. Programs are made up of
algorithms. Algorithms are the building blocks of a program. Algorithms can be written in simple English
Language, pseudocode, and flowchart. Algorithms go through the stages of inputs, processing, and output.

Characteristics of Algorithms

1. Well-defined: An algorithm should have clear, unambiguous instructions for each step. It should be
precisely defined and leave no room for interpretation.

2. Input: An algorithm takes input(s), which are the data or values it operates on to produce the desired
output. The input can vary based on the problem and the specific algorithm being used.

3. Output: An algorithm produces an output or a result based on the given input(s). The output can be a
value, a set of values, or a change in state.

4. Precise and deterministic: Each step of an algorithm should be precisely defined and predictable. Given
the same input(s), an algorithm should always produce the same output(s). There should be no randomness
or ambiguity in the execution.

5. Finiteness: An algorithm must eventually terminate after a finite number of steps. It should not result in
an infinite loop or continue indefinitely.

6. Effective: An algorithm should be efficient and practical, providing a feasible solution to the problem at
hand. It should not be overly complex or require excessive resources.

7. Unambiguous: Every instruction in an algorithm should be clear and leave no room for multiple
interpretations. It should be unambiguous and easily understood by both humans and computers.

8. Modular: Algorithms can be broken down into smaller, manageable modules or subroutines. This
promotes modularity, reusability, and easier maintenance.

9. Optimized: An algorithm can be optimized to improve its efficiency in terms of time complexity
(execution time) and space complexity (memory usage). Optimization aims to reduce resource requirements
while maintaining correctness.
10. Language-independent: Algorithms are language-independent, meaning they can be implemented in
different programming languages. The logic and steps of an algorithm remain the same regardless of the
programming language used.

In considering how an algorithm can be written, we have to take a look at the simple English language
method and pseudocode in this lesson.

An algorithm is basically made up of three building blocks (programming structures). They are Sequential,
Selection, and Iteration structures.

➢ Sequential Structures: Algorithms are written and executed in an orderly manner to


accomplish a specific action. It will begin by executing line 1, then line 2, and then
line 3, and so on until it reaches the end of your program. This type of statement is
simple to execute because it follows a sequential order or step – by – step order.

Example: Brushing the teeth. To brush the teeth, follow the algorithm below

Simple English Language Pseudocode


Step 1: Begin Start
Step 2: Locate your toothbrush and tooth Locate your toothbrush and locate paste
paste Locate your toothbrush and tooth
Step 3: Wash the toothbrush bristle paste
Step 4: Apply paste to the wet brush Wash the toothbrush bristle
bristles Apply paste to the wet brush bristles
Step 5: Brush your teeth Brush your teeth
Step 6: Rinse your mouth and brush well Rinse your mouth and brush well after
after brushing brushing
Step 7: Place the toothbrush and tooth Place the toothbrush and tooth paste in their
paste in their respective containers. respective containers.
Step 8: End Stop

➢ Selection Structures: The selection structure is also called conditional


or decision structure. It allows a user to choose an action with two or
more alternate actions (i.e., options) based on condition (s).
For example,

▪ You go to the bathroom to take a shower and realized there is no water.


You have the option to choose whether to go get water outside or to
wait till the tap starts to flow again;

▪ Purchasing of a car;

▪ Preparing beverages
11

▪ Choosing an even or an odd number etc.


Page
The algorithm below shows the purchasing of a Toyota car.

Simple English Language Pseudocode


Step 1: Begin Start
Step 2: Move to an automobile shop Move to an automobile shop
Step 3: Look through the car brands available and Look through the car brands
choose one. available and choose one.
Step 4: If the car is Toyota, then purchase it and go If car = Toyota, then purchase it
to step 5 else: Don’t buy it.
Step 5: Don’t buy it. Endif
Step 6: Leave the automobile shop Leave the automobile shop
Step 7: End Stop

➢ Iteration: The iteration structure is also known as control structure,


repetitive or looping structure. With the iteration structure, a single or group
of statements are executed repeatedly for a specific number of times. This
statement (s) will only stop once the condition is met. Meaning, it can be
used to repeat an action (s) over and over again until those actions are not
needed anymore. For instance, you ask the same question repeatedly when
adjusting a broken chair. You keeping asking “Is it comfortable now?”
Several times till the user says “Yes”. This is how the iteration or loop
structure operates.
Examples of algorithms with an iterative structure are:

❖ displaying the letters of alphabet;


❖ eating cereal for breakfast;
❖ repeating an announcement 10 times etc.

The iteration structure can be in the form of a: for loop, while loop, and do while loop statements.

The algorithm below shows the eating of cereal for breakfast.

Simple English Language Pseudocode


Step 1: Begin Start
Step 2: Put cereal into a bowl Put cereal into a bowl
Step 3: Add milk to the cereal and stir well Add milk to the cereal and stir well
Step 4: Take a spoon of the prepared cereal While bowl contains prepared cereal
Step 5: Repeat step 4 until you are done eating Take a spoon of the prepared cereal
Step 6: Wash the bowl until you are done eating
Step 7: End Endwhile
Wash the bowl
Stop
12
Page
Problem Solving Techniques

a. Decomposition: Decomposition is the process of breaking down a complex problem into smaller
sections to make it easier to deal with. It is a problem – solving technique used to break down
complex problems into smaller
problems that can be executed
one at a time.
For example, if you want to have lunch, Make Starter

you have to think of Make Meat


Course
i. What to have as lunch Make Dinner
Make Main Make Mashed
Course Potatoes
ii. Where to have lunch Make Vegetable
Course
iii. How to get there or have it Make Other
Make Dessert
Vegetable
delivered.

Also, it is much easier and faster to


write and execute 500 lines of code as compared to 5000 lines of codes.

b. Abstraction: It is a technique that hides background details about data implementation so that users
only see the information they need in order to improve efficiency and reduce complexity for users. It
does not imply that the details excluded are not important. They are usually not relevant to the user at
the moment.
Abstraction only shows the relevant information about an object. It is one of the most important and
significant features of the object – oriented
programming. 3. Abstract
class can have
abstract and
For instance, when your teacher asks where you non - abstract
methods
place you bag at home, you might only indicate the 4. It can have
constructions
“hall” or “bedroom” but when your parents ask and static
methods
the same question, you will tell the exact position
of the bag in the house such as, “by the table Abstract
behind the bedroom door”. Here, you have omitted class
certain details of the information given to your
2. It cannot be 5. It can have
teacher. This is called abstraction. instantiated final methods

1. Abstract
Furthermore, smartphone users are presented with class is
declared with
an interface or a graphical user interface (GUI) keyword
abstract
that hides the details from them. The user only has
the idea of just dialing a phone number by typing
the number directly or retrieving the number from his/her contact book.

c. Linear Search: A linear search is a simple search algorithm for sequentially finding the target
element in a list or dataset. It checks the element in an orderly manner until the match is found or
until the target element is identified. If the algorithm hits the end of the list with a match or locating
the target value, the search is aborted. Linear search is the most basic search algorithm for finding an
element in a data set or list of elements.
13

This algorithm is very easy to implement.


Page
For instance, in searching for a word in a puzzle, we check each letter in turns to see if it matches the
first letter of the word we are searching for.

The process of finding a target element or a certain value in a list is known as searching. An array is a
type of data structure that contains a list or collection of elements (values or variables).

Each element can be identified by an array index (i.e., location). In most programming languages, the
index of an array starts from 0 (Zero). This means the first element of an array can be located at index 0.

Find – ‘98’

10 45 8 2 98 33 11

How to perform a basic linear search

1) Start from the leftmost element of the chart and in an orderly manner, compare the element to be
searched for with each element of the chat.

2) If there is a match between the element being searched for and an element of the chat, then the search
is complete.

3) If there is no match between the element being searched for an element of the chat, then the search
will continue.
For example: Seach for 340 and display its position.

Index (position) 0 1 2 3 4 5 6 7 8 9
Data Value 30 9 21 28 380 19 45 35 223 61

Follow the following steps to locate the target element

Step 1: Begin

Step 2: The searched element 340 is compared to the first element of the array, which is 30.
The match is not found (i.e., 30 ≠ 340), you now move to the next element or step 3.

Step 3: Compare the target element 340 to the next element of the array, which is 9.
The match is not found (i.e., 9 ≠ 340), you now move to the next element or step 4.

Step 4: Compare the target element 340 to the next element of the array, which is 21.
The match is not found (i.e., 21 ≠ 340), you now move to the next element or step 5.

Step 5: Compare the target element 340 to the next element of the array, which is 28.
14

The match is not found (i.e., 28 ≠ 340), you now move to the next element or step 6.
Page
Step 6: Compare the target element 340 to the next element of the array, which is 340.
The match is found (i.e., 340 = 340), display the target element is found at 4.

Step 7: End the search

NOTE: The array index=x starts from 0.

TEST HUB
OBJECTIVE TYPE QUESTION

1. Algorithms refers to as B) To make them more expensive.


A) A set of rules or instructions that help solve C) To make them faster and easier to use.
problems or do tasks. D) To make them harder to understand.
B) A type of food that people eat for breakfast.
C) A game that people play on their phones. 6. How do algorithms help in sorting things?
D) A type of animal that lives in the ocean. A) By making things messy and disorganized.
B) By putting things in random order.
2. Why is it important for algorithms to have a C) By arranging things from smallest to largest
clear input and output? or vice versa.
A) So they can be written in any programming D) By hiding things and making them difficult
language. to find.
B) So they can finish in a reasonable amount of
time. 7. What can we infer about the relationship
C) So they can be used in everyday things like between algorithms and problem-solving?
phones and calculators. A) Algorithms make problem-solving more
D) So they can be understood easily. complicated.
B) Algorithms have no impact on problem-
3. What are some examples of how algorithms solving.
are used? C) Algorithms provide a systematic approach
A) Sorting things and finding specific words in to problem-solving.
a book. D) Algorithms are not useful for problem-
B) Cooking meals and playing sports. solving.
C) Drawing pictures and singing songs.
D) Building houses and driving cars. 8. What are some areas where algorithms are
used?
4. What is the purpose of algorithms? A) Computer science, mathematics, and
A) To make tasks more difficult. artificial intelligence.
B) To help solve problems and make tasks B) Cooking, painting, and dancing.
easier. C) Playing games, watching movies, and
C) To confuse people. listening to music.
D) To create chaos. D) Building houses, driving cars, and flying
planes.
5. Why are algorithms used in everyday things
15

like phones and calculators? 9. How do algorithms help in searching for


A) To make them heavier. specific words in a book?
Page
A) By making things messy and disorganized. 15. Which of the following logic is used to
B) By putting things in random order. produce loops in program logic when one or
C) By arranging things from smallest to largest more instructions may be executed several
or vice versa. times depending on some conditions?
D) By finding the word efficiently and quickly. A) Iteration Logic
B) Selection Logic
10. What three building blocks are used when C) Sequence Logic
designing algorithms? D) Decision Logic
A) Sequencing, programming, iteration.
B) Sequencing, selection, iteration 16. Selection logic is also called……….
C) Sequencing, selection, programming. A) Iteration Logic
D) Selection, programming, iteration. B) Looping Logic
C) Sequence Logic
11. Sequencing refers to….. D) Decision Logic
A) The order in which steps are carried out in
an algorithm. 17. Iteration is …….
B) The order in which we think A) a list of instructions which are followed in
computationally. a set order.
C) The process of repeating a number of steps B) a list of instructions where there is a choice
in a algorithm. based on a condition.
D) To ensure the algorithm is kept to a C) a list of instructions which will loop based
reasonable length. on a condition.
D) a list of instructions which will loop
12. How is sequencing represented in a flowchart? forever.
A) With sentences that look like a
programming language. 18. Another name for iteration is….
B) As a series of boxes that follow each other, A) loop B) Sequence
linked by arrows. C) Selection D) Pseudocode
C) As a series of diamond shaped boxes that
follow each other, linked by arrows. 19. What is a counter used for in iteration?
D) With sentences that look like programming A) To keep track of the number of steps
symbols. completed.
B) To keep track the number of times the
13. How is sequencing represented in solution has iterated.
pseudocode? C) To keep how many steps to repeat.
A) Each step of the algorithm is written on a D) To track all the statement to be executed.
line of its own, in sequence.
B) Each step of the algorithm is explained in a 20. When is linear searching used?
diagram. A) When the list has only a few elements.
C) All steps of the algorithm are written in a B) When performing a single search in an
diagram. unordered list.
D) None of the above. C) Used all the time.
D) When the list has only a few elements and
14. Which of the following is a pictorial when performing a single search in an
representation of an algorithm? unordered list.
16

A) Pseudocode B) Program
Page

C) Flowchart D) Algorithm
21. Which of the following is a disadvantage of A) binary search algorithm.
linear search? B) bubble sort algorithm.
A) t requires more space. C) sequential search algorithm
B) Greater time complexities compared to D) all the above.
another searching algorithms.
C) It is not easy to understand. 24. What is an advantage of a linear search
D) It is not easy to implement. algorithm?
A) Perform well with small sized data sets.
22. Where can Linear Search be performed? B) Can be used on data sets with more than a
A) On Letters B) On numbers million elements.
C) Both D) None of these. C) Is complicated to code.
D. Can only be used for numerical data.
23. A linear search algorithm is also known as a…

ESSAY TYPE QUESTIONS


b
1. Fill in the crossword puzzle with answers to
the statement below.

a) The process of breaking down a complex a


problem into smaller sections is known
as………………
e
b) A set of instructions used to perform a specific
task is termed as…………………… d

c) An algorithm has a …………….. structure


when it is written and executed in an orderly
manner.

d) …………… is a sequence of functions of a


computer program.

c
e) Algorithms are building blocks of a …………
f
f) …………… is a simplified programming language.

2. Explain what a linear search algorithm is.


3. State three (3) advantages and disadvantages of a linear search algorithm.
4. Explain the following terms:
a) Algorithm b) Decomposition c) Abstraction
5. Write an algorithm that determines whether an integer number entered by a user is an odd or even number.
(Note: Write the algorithm using pseudocode).
6. State three (3) characteristics of an algorithm.
17
Page
4. ROBOTICS

Discuss Robot Intelligence Concepts.

I. Understand the use of the components of a robot;


II. Demonstrate understanding of mechanical parts;
III. Describe how a range of sensors can be used to input data
into the computer;
IV. Demonstrate how sensors are used in real – life.

Introduction

As children and even now you engage in the science of robotics when you build cars and trucks with milk
cans. It is a perfect way of building machines to perform tasks during play times. In the case of robots, they
are programmed.

Robotics is the design, construction, operation and application of machines (robots) to perform tasks
done by human beings. Robotics is an interdisciplinary field that combines science, engineering and
technology.

A robot is a programmable mechanical device that executes tasks and interacts with its environment
without the help of human interaction.

Robotics can be applied in areas such as manufacturing, health, education, assembling and packing,
transport, surgery, laboratory research, mass production of consumer and industrial goods, taking pictures.

Robotic Machines In The Field Of Education

Robotic machines in the field of education play a crucial role in enhancing learning experiences, fostering
engagement, and providing innovative solutions to cater to diverse learning needs. These machines,
equipped with advanced technologies and interactive capabilities, serve various functions in educational
settings, including:

1. STEM Learning: Robots like Dash and Cue from


Wonder Workshop offer engaging STEM learning
experiences for students, teaching robotics,
coding, engineering, and other STEM-based
topics in a fun and interactive manner.

2. Language Learning: Educational robots like


NAO provide innovative approaches to language
learning by interacting with learners in a human-
like manner, engaging them in linguistic
18

interactions, pronunciation exercises, and


Page

grammar correction exercises.


3. Classroom Companions: Robots such as Pepper
by Softbank Robotics serve as teaching assistants
for STEAM subjects, providing customized
instruction, enhancing social and emotional skills,
and tracking student interactions to aid teachers in
monitoring student development.

4. Special Education: Robots like Beep are used in


special education to provide personalized instruction, cater to diverse learning styles, and assist
students with impairments, enhancing autonomy and reducing the impact of disabilities on learning.

5. Social Learning: Robots like Tega by MIT facilitate


social interactions, providing a safe and engaging
environment for learners to practice and refine their
social skills, fostering interpersonal communication
and collaboration.

6. Future Prospects: Educational robots are expected to


play a crucial role in transforming learning
experiences, equipping students with essential skills for
their future careers, and supporting diverse learners by
addressing challenges of cost, accessibility, and teacher
training.

Challenges of using robots in education

✓ Robot machines can be very expensive to purchase.


✓ They are vulnerable to cyber – attacks.
✓ It is difficult to integration moral concepts.
✓ High – quality infrastructure in the classrooms are needed.
✓ Robot machines have little or no alternative teaching methods.

Robotic Machines In The Field Of Health

Robotic machines in the field of health play a crucial role in


enhancing patient care, improving treatment outcomes, and
streamlining clinical processes. These machines, equipped with
advanced technologies and interactive capabilities, serve various
functions in healthcare settings, including:

1) Surgical Robotics: Robots like the da Vinci Surgical System


support minimally invasive surgeries, offering enhanced
precision, reduced recovery time, and improved patient
outcomes
19
Page
2) Laboratory Robots: Automated laboratory
robots increase speed, capacity, and
precision by reducing human error,
enabling technicians to focus on higher-
level tasks

3) Hospital Robots: These robots help sanitize


chambers and areas, excluding the need for
clinical staff to come in contact with
pathogens, and can deliver medicines,
meals, and samples around hospitals

4) Social Robots: Social robots in hospitals provide cognitive support to patients, particularly seniors
and children, by interacting with them socially, motivating them, and showing them how to perform
specific motor activities

5) Tele-Assistance: Robots can allow doctors to perform surgeries from remote locations, expanding
access to medical care and reducing the risk of pathogen exposure

6) Rehabilitation and Prosthetics: Modular robots, such


as therapeutic exoskeleton robots and prosthetic limbs,
support rehabilitation efforts for patients with issues
related to stroke, paralysis, traumatic brain injury, and
multiple sclerosis.

7) Service Robots: Service robots primarily serve


healthcare professionals by completing routine
logistical tasks, such as preparing patient rooms,
tracking supplies, and transporting bed linens

Challenges of using robots in Health

• There is a lack of emotional support and development of human beings when using robots.
• There is no social acceptance in the use of robots in the healthcare industry
• There is limited privacy and security with regards to the records of patients when using robot
machines.
• Robots can be expensive.
• Lack of alternative power source for robots.
20
Page
Robotic Machines In The Field Of Manufacturing

Robotic machines play a crucial role in the field of


manufacturing, enhancing efficiency, productivity,
and quality across various industries. These
machines, equipped with advanced technologies and
interactive capabilities, serve various functions in
manufacturing settings, including:

❖ Material Handling: Robots are used for


material transfer, machine loading and
unloading, and palletizing, ensuring efficient
movement of materials and work parts within
the production process

❖ Processing Operations: Robots manipulate


tools to perform processes like spot welding,
continuous arc welding, and spray painting,
enabling high-quality and precise production

❖ Assembly and Inspection: Robots are used in


assembly lines to perform tasks like
screwing, snapping, and other fastening
procedures, and in inspection to determine
whether parts meet quality specifications.

❖ Flexible Manufacturing Systems:


Flexible manufacturing systems
(FMS) link multiple machine tools
together, controlled by a central
computer, enabling efficient
production of diverse products

❖ Automotive Industry: Robotic


welders, in particular, have been
instrumental in the automotive
industry since 1967, increasing safety, reducing costs, and enhancing efficiency in welding
applications.

Challenges of using robots in Manufacturing

o There is lack of the skillset and experience needed to operate the robot machines.
o Cost of purchasing the robot can be very high.
o There aren’t enough safety features and measures for operating the robots.
o There is the need for consistent maintenance.
21

o Employees live in the fear that they would be replaced by robot machines.
Page
Robotic Machines In The Field Of Military

Robotic machines have become increasingly prevalent in


the military field, serving various purposes from
transport to search & rescue and attack. These
autonomous robots or remote-controlled mobile robots
are designed for military applications and are currently in
use, with many more under development

Some key applications of military robots include:

Material Handling: Robots are used for material


transfer, machine loading and unloading, and palletizing,
ensuring efficient movement of materials and work parts within the production process

Processing Operations: Robots manipulate tools to perform


processes like spot welding, continuous arc welding, and
spray painting, enabling high-quality and precise production

Assembly and Inspection: Robots are used in assembly lines


to perform tasks like screwing, snapping, and other fastening
procedures, and in inspection to determine whether parts
meet quality specifications

Flexible Manufacturing Systems: Flexible manufacturing


systems (FMS) link multiple machine tools together, controlled by a central computer, enabling efficient
production of diverse products

Unmanned Aerial Vehicles (UAVs): Military robots have


been taking to the skies, with the use of drones for
reconnaissance and attack missions

Challenges of using robots in Military

▪ Can be hacked by the enemy camp and used against


the owner.
▪ Cost of robot machine is very high.
▪ Little or no flexibility to respond appropriately in unexpected situations.
22
Page
TEST HUB
OBJECTIVE TYPE QUESTION

1. Robot is a name derived from Czech word… d. Reduced company cost for workers fringe
a. Rabota b. Robota benefits.
c. Rebota d. Ribota
6. Which of the following is the exact name for
2. A Robot is a ……. information sent from robot sensors to
a. programmable object controllers of the robot?
b. multi – functional manipulator a. Temperature b. Pressure
c. both a and b c. Feedback d. Signal
d. none of the above
7. Decision support programs are designed to
3. The main objective (s) of industrial robot is / help managers make…..
are to a. Vacation schedules
a. minimize the labour requirement b. Visual presentations.
b. increase productivity c. Budget projections.
c. enhance the life of production machines. d. Business decisions.
d. all the above
8. Which of the following is not application of
4. Sensors used in measurement systems are Robotics?
a. speed and position sensor a. Hills b. Medicine
b. Amplifier circuits, driving motors and ball c. Military d. Industries.
lead screw.
c. numerical control sensors 9. Which of the following branches is not part of
d. measurement sensors. robotics?
a. Computer Science
5. Which of the following is not one of the b. Electrical Engineering
advantages associated with a robotic c. Mechanical Engineering
implementation program? d. Chemical Engineering.
a. Low cost for hardware and software.
b. Robots work continuously around the clock. 10. ……. Is not a type of Robot Locomotion.
c. Quality of manufactured goods can be a. Wheeled b. Legged
improved c. Tracked deslip d. None of the above

ESSAY TYPE QUESTIONS

1. Differentiate between a robot and robotics.

2. a) List five (5) arears where robotics can be applied.


b) Explain the use of robotics in the above mentioned areas.
c) Identify some of the challenges of using robots in the areas outlined in 1 (b)

3. Make a sketch of a robot.


5. ARTIFICIAL INTELLIGENCE

Discuss Artificial Intelligence concepts.

I. Compare the key technologies: machine learning, Artificial


Neural Networks (ANN);
II. Discuss the uses and importance of Artificial Intelligence (AI) to
society;
III. Demonstrate how sensors are used in real – life.

Introduction

Artificial intelligence (AI), refers to the development and implementation of computer systems that can
perform tasks that would typically require human intelligence. AI aims to simulate human cognitive
abilities such as learning, problem-solving, reasoning, and decision-making.

Artificial intelligence (AI) refers to the simulation of human intelligence processes by machines,
particularly computer systems. It encompasses various applications such as expert systems, natural
language processing, speech recognition, and machine vision. AI is widely utilized across industries,
including banking, where it is employed for tasks like improving decision-making for loans, setting credit
limits, and identifying investment opportunities. In transportation, AI plays a crucial role in managing
traffic, predicting flight delays, and enhancing safety in ocean shipping.

Key Technologies Of AI

1. Machine Learning (ML): Machine learning involves the


development of algorithms and models that enable
computers to learn and improve from data without being
explicitly programmed. ML techniques include supervised
learning (training models with labeled data), unsupervised
learning (finding patterns and relationships in unlabeled
data), and reinforcement learning (learning through trial
and error with rewards and penalties).

2. Artificial Neural Networks (ANN): Artificial Neural networks are


computational models inspired by the structure and functioning of the
human brain. They consist of interconnected nodes, or artificial
neurons, organized in layers. Neural networks are capable of learning
complex patterns and relationships, making them essential for tasks
such as image recognition, natural language processing, and speech
recognition.
3. Deep Learning: Deep learning is a subset of
machine learning that focuses on automating
predictive analytics. It involves training
computers to accomplish specific tasks by
processing large amounts of data and
identifying complex patterns. Deep learning is
crucial for applications like self-driving cars,
text, image, and audio generation, and
automation tools that expand the volume and
types of tasks performed.

4. Gamification: Gamification is a strategic approach that


leverages game design elements and principles to
enhance engagement, motivation, and participation in
non-game contexts. It involves incorporating game
mechanics like points, levels, badges, leaderboards, and
progress bars into various activities to drive desired
behaviors and outcomes. Gamification aims to tap into
individuals' natural tendencies for competition,
achievement, collaboration, and self-expression,
encouraging them to achieve goals, boost performance, and enhance learning experiences.

5. Augmented reality (AR) refers to a technology that


overlays computer-generated sensory information,
such as images, videos, or 3D models, onto the real-
world environment to enhance the user's perception
and interaction with their surroundings. AR blends
digital content with the physical world, allowing users
to see and interact wit
6. h virtual elements in real-time.

AR systems typically rely on devices such as


smartphones, tablets, smart glasses, or headsets to deliver the augmented experience. These devices
capture the real-world environment through cameras and display the augmented content on their screens
or project it directly into the user's field of view.

Uses of AI to Society

➢ Improving Healthcare: AI can help improve healthcare by assisting in disease diagnosis, drug
discovery, personalized treatment recommendations, and early disease detection.
For example, IBM Watson Health uses AI to help doctors diagnose and treat cancer patients by analyzing
vast amounts of medical data

➢ Enhancing Education: AI can personalize learning experiences, adapt to individual student needs, and
25

provide intelligent tutoring systems. It can also help in grading assignments and providing feedback to
Page

students and teachers.


.
➢ Addressing Climate Change: AI can aid in the fight against climate change by optimizing energy
consumption, improving weather forecasting, and helping in the development of sustainable solution. AI
algorithms can analyze large amounts of climate data to identify patterns and trends.
.
➢ Reducing Poverty and Hunger: AI can help in the distribution of resources, identify areas of need, and
optimize supply chains to reduce poverty and hunger. It can also assist in precision agriculture to
increase crop yields.

➢ Enhancing Public Safety: AI can be used for crime prevention, identification, and case-solving. It can
also help in disaster response and management by analyzing data from various sources to predict and
mitigate potential disasters.

Improving Transportation: AI can optimize traffic flow, predict delays, and enhance safety in transportation
systems. Self-driving cars, powered by AI, have the potential to reduce accidents and improve mobility for
those who cannot drive.

Enabling Smart Cities: AI can help in the development of smart cities by optimizing energy usage,
improving waste management, and enhancing public services. It can also help in urban planning and
decision-making processes.

Importance of AI to Society

1. Enhancing Access to Education and Healthcare: AI can improve access to education, healthcare,
and clean water, contributing to better outcomes and increased opportunities for individuals

2. Fighting Climate Change, Poverty, and Hunger: AI can aid in the fight against climate change,
poverty, and hunger by optimizing processes, identifying patterns, and providing accurate predictions
to address these global challenges.

3. Transforming Workforce and Job Roles: AI has the potential to transform the workforce by
automating routine tasks, freeing up humans to focus on higher-level activities that require creativity,
critical thinking, and empathy.

4. Improving Healthcare and Patient Outcomes: AI can dramatically influence healthcare by


analyzing vast amounts of data quickly and accurately, leading to improved patient outcomes,
reduced costs, and personalized treatment plans.

5. Enhancing Productivity and Efficiency: AI can significantly improve workplace efficiencies,


augment human capabilities, and increase productivity by automating tasks and optimizing
processes.

6. Driving Innovation and Progress: AI has the potential to drive innovation, accelerate progress
towards achieving the United Nations Sustainable Development Goals (SDGs), and provide solutions
to complex societal challenges.
26
Page
7. Ensuring Ethical and Responsible Development: It is crucial to ensure that AI is developed and
used in an ethical and responsible manner to avoid unintended negative consequences and ensure that
the benefits of AI are shared by all members of society.

8. Empowering Decision-Making and Problem-Solving: AI can enhance decision-making processes,


improve problem-solving capabilities, and provide valuable insights to individuals and organizations
across various sectors.

TEST HUB
OBJECTIVE TYPE QUESTION

1. What does “AI” stand for? 6. Which of the following is a component of AI?
a. Artificial Intelligence a. Learning b. training
b. Artificial Intellect c. Designing d. Puzzling
c. Automatic Intellect
d. Automatic Intelligence 7. The application (s) of AI is / are
a. Expert systems
2. …… technology makes users feel as if they b. Gaming
truly are in a virtual environment. c. Vision systems
a. IR b. RA d. All of the above
c. AR d. VR
8. What is machine learning?
3. What is Artificial Intelligence? a. The selective acquisition of knowledge
a. A field that aims to make humans more through the use of manual programs.
intelligent. b. The selective acquisition of knowledge
b. A field that aims to improve the security. through the use of computer programs.
c. A field that aims to develop intelligent c. The autonomous acquisition of knowledge
machines. through the use of manual programs.
d. A field that aims to mine the data. d. The autonomous acquisition of knowledge
through the use of computer programs.
4. Which of the following is a branch of
Artificial Intelligence? 9. Machine learning is a subset of ….
a. Machine Learning a. Deep Learning
b. Cyber forensics b. Artificial Learning
c. Full – stack developer c. Data Learning
d. Network design d. Virtual Learning

5. Which of the following is an application of 10. Which of the following is not the promise of
Artificial Intelligence? artificial Neural Network?
a. It helps to exploit vulnerabilities to secure a. It can explain result
the firm. b. It can survive the failure of some nodes.
b. Language understanding and problem – c. It has inherent parallelism
solving. d. It can handle noise
27

c. Easy to create a website.


d. It helps to deploy applications on the cloud.
Page
11. Which of the following is a subset of machine c. Machine Learning
learning? d. All the above
a. Numpy b. SciPy
c. Deep Learning d. All the above 14. The computer program simulating the thought
process of humans is known as……
12. Which of the following is an essential process a. expert reason
in which the intelligent methods are applied to b. personal information
extract data patterns. c. expert system
a. Warehousing d. human logic
b. Data Mining
c. Text Mining 15. Which of the following is an expansion of
d. Data Selection Artificial Intelligence Application.
a. Game playing
13. The classification of the data mining system b. Planning and Scheduling
involves…… c. Diagnosis
a. Data Technology d. All the above
b. Information Science

ESSAY TYPE QUESTIONS

1. Explain the following AI terms.


a) Machine Learning b) Deep Leaning c) Artificial Neural Network

2. Outline five (5) important of AI in the society.


3. Discuss three (3) disadvantages of AI applications.
4. Fill the following words in the puzzle.

Robot Design Artificial Machine Route


Operate Intelligence Capacity Hack Harm
Mechanical Think Analyse

A R T I F I C I A L C O D
N K T O B O R B U S E L Y
L P W F A O D R O J I D I
Y E I O C M H D M E O E T
S R R R K A G K A H I S B
E F E M R T N P T T N I O
K O N M V I A S I D A G T
I R G O D C M A C H I N E
T M U L A C I N A H C E M
28
Page

You might also like