Computer Class 10th
Computer Class 10th
SSEE
Computer
ComputerApplications
Applications
ForClass
For IXIX
ClassX
Sarika Kaushal
Sarika
SarikaKaushal
Kaushal
Indiannica
IndiannicaLearning
LearningPrivate
PrivateLimited
Limited
Indiannica Learning Private Limited,
(formerly
(formerlyknown
knownasasEncyclopædia
EncyclopædiaBritannica
Britannica(India)
(India)Private
PrivateLimited),
Limited),
a subsidiary of Navneet Education Limited
a subsidiary of Navneet Education Limited
a subsidiary of Navneet Education Limited
New Delhi, India
New
NewDelhi,
Delhi,India
India
Computer Applications
Published in India by
Indiannica Learning Private Limited,
a subsidiary of Navneet Education Limited. For Class IX
A-41, Mohan Cooperative Industrial Estate, Main Mathura Road, New Delhi 110044
All rights reserved. No part of this work may be reproduced or utilized in any form or by any means, electronic or
mechanical, including photocopy, recording, or by any information storage and retrieval system without permission
in writing from the publisher. Enquiries concerning reproduction outside the scope of the above should be sent to
the address above. You must not circulate this book in any other binding or cover and you must impose this same
condition on any acquirer.
ISBN: 978-93-88801-96-6
Sarika Kaushal
Computer Applications in the school curriculum for class X deals with concepts related to
computer technology. Computers are an integral part of our lives, and it is essential for learners to
keep face with fast-changing computer technology. It is imperative to enable learners to apply the
computer technology tools and provide them ample scope to explore and experiment with these
tools. Computer Applications, an Indiannica Learning school book for class X, is based on the
2019 CBSE syllabus for Computer Applications (code 165), earlier Foundations of Information
Technology. The book communicates about information technology through an interactive and
hands-on approach.
All the application programs are based on the open-source software. The key concept behind this
book is its task-based approach which encourages learning through application. The chapters are
supplemented with examples which are given in a graded manner to make the process of learning
simple and effective. To indicate the specific skill to be evaluated icons have been inserted beside the
relevant text. These are coded as given below.
e Environment, v Values
Unit 1: Networking
• Internet: World Wide Web, web servers, web clients, web sites, web pages, web browsers, blogs, news
groups, HTML, web address, e-mail address, downloading and uploading files from a remote site. Internet
protocols: TCP/IP, SMTP, POP3, HTTP, HTTPS. Remote login and file transfer protocols: SSH, SFTP,
FTP, SCP, TELNET, SMTP, TCP/IP.
• Services available on the internet: information retrieval, locating sites using search engines and finding
people on the net;
• Web services: chat, email, video conferencing, e-Learning, e-Banking, e-Shopping, e-Reservation,
e-Governance, e-Groups, social networking.
• Mobile technologies: SMS, MMS, 3G, 4G
Unit 2: HTML
• Introduction to web page designing using HTML: create and save an HTML document, access a web page
using a web browser.
• HTML tags: html, head, title, body, (attributes: text, background, bgcolor, link, vlink, alink), br (break),
hr(horizontal rule), inserting comments, h1..h6 (heading), p (paragraph), b (bold), i (italics), u (underline),
ul (unordered list), ol (ordered list), and li (list item). Description lists: dl, dt and dd. Attributes of ol (start,
type), ul (type).
• Font tags (attributes: face, size, color).
• Insert images: img (attributes: src, width, height, alt), sup (super script), sub (subscript).
• HTML Forms: Textbox, radio buttons, checkbox, password, list, combobox.
Software: Windows is a registered trademark of Microsoft Corporation in the United States and other countries. Python®
is a registered trademark of Python Software Foundation (PSF). Scratch is designed and developed by the Lifelong
Kindergarten Group at MIT Media Lab.
Photos/Illustrations:
Cover and title page: (internet and information technology): © Nmedia/Dreamstime.com.
p. 47 (microprocessor): © Ericlefrancais/Dreamstime.com; p. 67 (microphone): © Elena Perminova/Dreamstime.com;
pp. 67, 68 (graphics tablet): © Maria Vazquez/Dreamstime.com; pp. 74, 75, 76, 99 (flower): © Fnadya76/Dreamstime.com;
p. 99 (elephant): © Ondšrej Prosický/Dreamstime.com; p. 103 (school building): © Tigatelu/Dreamstime.com; p. 107 (Taj
Mahal): © Julia Balakhonova/Dreamstime.com; p. 108 (tiger): © Levranii/Dreamstime.com.
Communication is the process in which a person can share their ideas, thoughts, and feelings with
other people. Computer and communication technologies have transformed the way we exchange
information. Today, a person sitting in one part of the world can communicate with someone sitting
in another part of the world in a matter of seconds.
Today’s computers have the ability to communicate or exchange data or information with other
computers. However, to be able to communicate with each other, the computers need to be
connected. This interconnection of computers is called a network and the interconnection of networks
is called the internet.
1
Fig. 1.1: Internet—facilitating communication
Internet organizations
The internet has grown tremendously with millions of users connected to it from countries around
the globe. However, there is no single organization that owns, controls, or manages the internet.
Instead, several well-known organizations collectively participate in the research, development, and
management of the internet. Some of these organizations are described here.
• Internet Society (ISOC): The internet society was established in 1992. This society is responsible for
providing organizational infrastructure for the internet standard groups maintaining the internet
code of conduct.
• Internet Architecture Board (IAB): It oversees the development of the internet technology standards.
• Internet Engineering Task Force (IETF): It deals with the architecture of the internet. It defines the
standards and protocols for smoothly operating the internet.
R
es
po
request services of the server and to display the results from
ns
e
the server. The server is a program that hosts and manages
the services available on the internet.
The clients reside on individual workstations or personal
computers. The servers reside elsewhere on the network,
usually on more powerful machines. However, sometimes
R
eq
the machines on which the client and server programs
ue
st
reside are themselves referred to as clients and servers. It is
the client that initiates the communication with the server. Client
The server waits for a request from the client and responds Fig. 1.2: Client-server architecture
to such requests.
The
internet
Modem
PC
A modem is a device that converts the digital signals into analogue signals and vice versa. It has derived its name from
two words—modulator (mo) and demodulator (dem).
Phone line
Internet service
Modem provider (ISP)
Internet user
Fig. 1.4: Dial-up connection
Internet user
The internet
The internet
Telephone
Cable modem
DSL modem
Modem
ISP The internet
Router
Laptop
Phone
Web browser
The name browser comes from the word ‘browse’, which means to navigate. Thus, we can say that a
browser is an application program used to look at and interact with all the information on the WWW.
Microsoft Edge, Google Chrome, Mozilla Firefox, and Safari are some of the popular internet browsers.
They all have a graphical and user-friendly interface.
The browser works in the following way:
• It interprets the user’s request for a web page and sends it to the server.
Fig. 1.8
A browser has various tools for the convenience of the user. Let us have a look at some of the tools on
the toolbar of Firefox.
• Back It takes you to the previously opened web page.
• Forward It takes you to the next web page, which has already been visited.
• Stop It stops the loading of the web page.
• Reload or Refresh It fetches a fresh copy of the web page.
• Home It returns you to the page at the start.
• Bookmarks or Favorites A web browser has a Bookmarks or Favorites folder where you can
save links to your favourite or frequently visited sites. This allows you to quickly return to a website
simply by clicking on its link.
Web pages
A web page is a document on the WWW created using hypertext markup language (HTML). It may
contain different types of data like text, hyperlinks, images, videos, tables, and so on. The special element
of a web page is the hypertext. Hypertext acts as a hyperlink between the web pages. When a hypertext
is clicked, the person viewing the web page is taken to a different web page or to a different location on
the same web page. The presence of hypertext thus makes a web page a non-linear document.
Fig. 1.9
Websites
A website is a collection of related web pages on the WWW, identified by a unique name. The unique
name of the website is called its domain name. A website is hosted on a web server on the WWW. The
first page of the website is called its home page. Any individual or organization can create its website.
However, to host the website on a web server, it has to be first registered with a unique name. Hosting
a website means uploading it on a web server and making it available to the WWW users.
Figure 1.10 shows the home page of the website www.indiannicalearning.com.
Fig. 1.10
Fig. 1.11
Web servers
A web server is a program on a server computer that hosts a large number of web pages and delivers
the requested web pages to the clients. Web servers are installed on fast and powerful machines
that host websites.
The features of the communication between a client and
a web server are given below:
In 1989, Tim Berners-Lee
• The server never initiates the communication proposed to his employer
with a client. It is always the client that starts the CERN a new project, which
communication with the server by requesting for a had the goal of easing the
web page. exchange of information
between scientists by using a
• On receiving the request for a web page, the web hypertext system. As a result
Did You Know?
server retrieves the requested web page and delivers it of the implementation of this
to the client. project, in 1990 Tim Berners-
• The web server can handle simultaneous requests from Lee wrote two programs:
multiple clients. (a) A browser called
WorldWideWeb.
• In addition to delivering web pages, the web server (b) The world’s first web server,
is capable of handling errors. In case the web server later known as CERN
encounters some problem in delivering a web page, it HTTPd, which ran on
sends an appropriate error message to the client. NeXTSTEP (Nextstep was
the original multitasking
There are many web servers programs available today.
operating system).
Listed below are a few examples of these web servers:
10
There are certain conventions and rules that must be followed while deciding a domain name. So if
you create your website, you will have to remember a few rules before finalizing the domain name.
1. A domain name can have alphabets, numbers, or even a combination of alphabets and numbers.
2. The only special character allowed in the domain name is hyphen (-).
3. The length of a domain name cannot be more than 64 characters (including extensions like ‘.com’).
4. A domain name must have a valid domain extension. For example, ‘.com’, ‘.net’, or ‘.org’.
IP ADDRESS
Every TCP/IP network and a computer in a network should have a unique identity to avoid
connection and transmission errors. This unique identity of each computer on a network is provided
by assigning it a unique IP address. It is a numerical address given to every computer connected to the
internet for its unique identification.
An IP address is a 32-bit address represented in four
groups of numbers from 0 to 255. These groups are
Did You Know?
separated by periods. For example, 64.124.236.124 could To know the IP address of any
website, do the following:
be an IP address. These groups in an IP address are
Click Start Run
called octets. Each of the groups is an 8-bit field, which
In the Run command box, type
represents a byte of the address.
‘ping’ followed by the website
The ISP assigns its users either a static IP address (which name.
always remains the same) or a dynamic IP address (which
changes every time the user logs on).
11
EMAIL ADDRESS
Email stands for electronic mail. It is a system for
sending and receiving messages electronically over a Try it out t s
computer network. In order to send or receive emails, a Find the IP address of your favourite
user must first get a unique email address. website. Now, try to open it by typing
An email address is the combination of a unique in the IP address instead of the
username followed by the domain name. The username domain name.
is separated from the domain name by the symbol ‘@’.
The domain name specifies which server the email should
be delivered to, and the username tells the server the
name of the mailbox where the email will be deposited.
For example, [email protected] is a valid email address.
An email address has three parts:
• a username (which is abc in the above example);
• an ‘at’—@—sign; and
• the address of the server (which is example.com in this case).
12
1 2 3
1—specifies the protocol used for the transfer of the resource
2—specifies the domain name or IP address of the web server
3—specifies the path or location of the resource on the web server
Here, you will notice that the protocol identifier and the resource name are separated by a colon.
BLOGS
A blog is a website that allows users to share opinions and discuss various topics in the form of an
online journal. A blog is generally based on a particular topic or theme. The readers may leave
comments on the posts. A blog is updated frequently and generally contains text, images, and links to
other blogs.
Features of a blog
• A blog is normally a single page of entries.
• A blog is organized in reverse-chronological order, from the most recent entry to the least recent.
• A blog is normally public—the whole world can see it.
• The entries in a blog usually come from a single author.
NEWSGROUPS
The internet is not only about chatting, emailing, or exploring. It provides a large number of other
services to its users. One such service is that it allows to communicate with people who share common
interests. For example, if someone wants to discuss or learn about the latest developments in IT, he or
she can join an IT group. Such a group on the internet where one can share ideas on a specific topic with
other people is called a newsgroup. It is like an electronic bulletin board.
On a newsgroup, you can search for a specific topic and find posts or messages related to that topic.
You can view these posts, respond to them, or submit your own posts. However, to post messages on a
newsgroup, you will have to first become its member. The advantage of this type of medium is that the
messages stay on the ‘board’ for others to view and respond to for a minimum of 24 hours up to one
week. You can search for any topic you can think of in a newsgroup. From computer products to medical
technologies to the latest happenings on your favourite program, newsgroup is available for every topic.
13
POP3
POP3 stands for post office protocol (version 3). It is based on the client-server architecture. It is a
standard protocol used to receive emails from a server.
The POP3 protocol allows us to download an email message on our local machines. Every time, when
we connect to our email client using POP3, emails gets downloaded on the local machines and are
removed from the server. One of the most commonly used POP3 clients is Microsoft Outlook.
14
Telnet
TELNET stands for TELetype network. It is a network protocol that allows a user to log into a remote
host and execute commands on it as if they were logged in locally.
[Note: A remote host is a computer in a remote location to which you do not have physical access.]
15
SFTP
It is a secure way of transferring a file, hence the name secure file transfer protocol. It allows FTP to
first use the secure shell protocol to establish a secure connection and then the file gets transferred
over the network. The encrypted version of the file gets transferred making it safe and secure. FTP
should only be used on the networks you trust. In FTP, even if the user has to provide a password for
transferring the files, the password is sent in a text format which can easily be accessible and hacked,
but it is not the case with SFTP as the security key is encrypted. Thus, SFTP is always preferred over
FTP.
SCP
It stands for secure copy protocol. It is basically a file transfer protocol that is used to transfer files
between the host and the server over a computer network. It also uses the secure shell protocol to get
the secure connection for file transfer and works like SFTP.
The similarities between SCP and SFTP are that they both use SSH and support transferring of larger
files. But the difference lies in the speed of transferring the files. It is much higher in SCP than SFTP.
This is due to the file transfer algorithm of SCP, which is highly efficient. Secondly, SCP provides
less functionality in terms of file management such as creating directories and adding, removing, or
renaming the files. SCP is basically used for transferring the files securely. SFTP, on the other hand,
provides these functionalities apart from transferring the files, and therefore SFTP not only transfers
the files, it also manages the files.
Wordbank
16
We have learned
• The internet is the largest network that connects millions of individual computers and smaller
networks together.
• The internet grew out of a special project of the US Department of Defense called
ARPANET.
• The internet is based on the client-server architecture.
• The internet operates and routes messages even if a part of it is damaged.
• The World Wide Web (WWW) contains information in the form of hypertext documents.
17
Solved Examples
1. Explain the term ‘internet’. 6. What does an ISP do?
Ans. The internet is an interconnection of networks. Ans. An ISP (internet service provider) is the
It connects thousands of networks and millions company that provides internet access to
of individual computers together across the individuals and organizations for a fee. The ISP
globe. creates an account for each internet user and
assigns a user ID and password for accessing the
2. How is data transmitted over the internet? internet.
Ans. The internet uses the packet-switching
technology for the transmission of data. In 7. What is the protocol used by WWW?
packet switching, large messages are broken Ans. The WWW (World Wide Web) uses the
into smaller pieces, known as packets. hypertext transfer protocol (HTTP) for the
Each packet is labelled with the sequence transfer of documents.
number, destination address, and other
relevant information. The packets then travel 8. Name the protocol used for transfer of
independently over the network to the target electronic mail over the internet?
destination. At the destination, the packets are Ans. Simple mail transfer protocol (SMTP)
reassembled to form the original message.
9. How does the TCP/IP work?
3. What is a blog? Ans. The TCP/IP works in the following ways:
Ans. A blog is a website that allows users to share
(a) TCP establishes a connection between the
opinions and discuss various topics in the form
computers that want to communicate. It
of an online journal.
divides the file or message to be transmitted
4. What is a web server? into small units called packets. It also
sequences the packets.
Ans. A web server is a program on a server computer
that hosts a large number of web pages and (b) IP labels source and destination addresses
delivers the requested web pages to the clients on each packet. It decides the route through
(web browsers). which packets are forwarded towards the
destination. It is not necessary that all the
5. What is the role of DNS? packets will follow the same path and reach
Ans. DNS or domain name system is a system that the destination in the same sequence in
translates domain names into IP addresses on which they were despatched.
the internet or on local networks that use the (c) At the destination computer, TCP
TCP/IP protocol. reassembles the received packets. It ensures
18
Exercises
t 1. Match the columns.
(b) Write expansions of the following web (d) Name the remote login protocols.
extensions: (e) Expand the term ISP. Name any two ISPs
(i) .net operating in India.
(ii) .com (f) How many bits does an IPv4 address use?
(iii) .org
(iv) .edu
(k) What is a web browser? Name two (n) What is a home page?
commonly used web browsers. (o) What is a web server?
(l) What is Telnet? (p) What do you understand by URL? Give
examples.
(q) Explain the differences between HTTP and
HTTPS.
21
(ii) Tim Berners-Lee
22
• You want to have an internet connection at your home. Apart from the computer, which
other hardware units will you need?
• You have created a website of your own, and now you want to register your site. s
What web extension would you apply for? Give reason.
23
The internet offers a host of services to its users. It is rapidly widening its reach among people.
Thus it has become a powerful medium of communication in today’s world. In this chapter, we will
discuss some of the most popular and commonly used services available on the internet.
INFORMATION RETRIEVAL
The World Wide Web (WWW) is considered a storehouse of information. It contains information
about almost any topic in the form of web pages. These web pages are located on many web servers
on the internet. To retrieve information, we need a browser to send a request. The browser directs the
request to the web server and then displays the retrieved information.
To access a specific web page,
you need to enter its URL
(address of the web page) on
the address bar of the browser.
The web page is displayed
in the document window
of the browser. The web
page may contain hyperlinks
that may guide you to other
pages containing additional
information.
For example, enter the address
www. indiannicalearning.
com in your browser. On the
displayed web page, click on the
Fig. 2.1
SCHOOL SOLUTIONS link.
24
Fig. 2.2
In case you do not know the address of a specific web page containing the information you need, you
can use a search engine to search for the relevant information.
SEARCH ENGINES
A search engine is an application that is used to search the content on the Web with the help of
specific keywords.
The search engines generally contain the following components:
1. A computer program, called crawler or spider, to crawl the pages on the Web and log information,
such as keywords and URLs, in a database or an index
2. A database or index of information such as keywords and URLs
3. An algorithm to search its database and return a page containing links to the pages related to the
keyword(s) provided by a user
Some commonly used search engines are Google, Yahoo, Bing, Lycos, Excite, Alta Vista, and
Go.com.
25
Fig. 2.3
Using Boolean OR
When you use the word OR to join the search words, you get links to web pages containing either
of the two words. For example, if you type ‘Rocket OR Science’ in the search box, the search engine
returns web pages that contain either word ‘Rocket’ or ‘Science’.
26
CHAT
Chatting is a way of communicating on the internet by means of exchanging text messages. It is one of
the most commonly used services of the internet. It allows users to exchange messages in real-time.
Some websites also provide a chat facility to their registered users. Two people can chat with each
other online if they use the same chat program and are logged in at the same time. These websites
are called chat sites, and the group of people with a common interest to share ideas and views are
called chat rooms.
A chat program operates in the following way:
• The first-time users need to register to get the username and password.
• To start chatting, log into the chat program by using the registered username and password.
• Select a chat room of your choice from the list of available chat rooms.
• After selecting a chat room, a list of users in that chat room is displayed.
• Type your messages in the text box provided, and press the send button.
• The messages of all the users are visible in the display area for everyone to see.
• You can also send private messages in a chat.
[Note: Private messages are only visible to the user to whom they are sent.]
EMAIL
Electronic mail, or email, is used to send messages electronically to individuals or groups of people.
You can send or receive attachments, such as text documents, pictures, audio, and video, with the
messages.
Email provides a fast, efficient, and cost-effective way to communicate with distant friends, family
members, or colleagues. You can send an email to a person in the same building or any part of the
world.
27
Fig. 2.4
An email is divided into two parts: header and body.
• The header contains the following fields.
o To: This field contains the email addresses of the recipients of the mail.
[Note: An email address has the form ‘username@hostname’. For example, in the email address
[email protected], ‘abc’ is the username and ‘example.com’ is the hostname.]
o Cc: The term ‘Cc’ stands for carbon copy. This field contains the email addresses of the recipients
who will also get a copy of the mail.
o Bcc: The term ‘Bcc’ stands for blind carbon copy. The recipients in this field will receive the mail
without any of the other recipient knowing about it.
o Subject: This field contains the subject of the message.
28
Videoconferencing
Videoconferencing is a method of real-time visual communication between two or more users. Any
number of people can video chat regardless of their locations. A videoconferencing involving two
locations is known as point-to-point, while a videoconferencing involving more than two locations is
called a multipoint conference.
Advantages of videoconferencing
• Videoconferencing is a useful method as it saves time and travel expense.
• It allows people in different locations to hold a face-to-face meeting.
• It can be used for job training sessions, interviews, and company meetings.
E-learning
E-learning, also known as electronic learning, refers to a teaching and learning system that can be
obtained through the internet by using a computer. It is often referred to as online education or online
learning. Teachers and students can connect from different locations simultaneously without the need
for them to be physically present at the location. Anyone can take the lessons anytime anywhere.
Advantages of e-learning
• E-learning is available at a less expensive cost.
• There are no geographical constraints to use the e-learning system. Therefore, it offers
opportunities in situations where traditional education is difficult to pursue for the students.
• E-learning is more flexible in terms of time. So students can take the learning sessions according to
their schedules.
• Universities or colleges can give online courses without having to bear the infrastructural cost.
E-banking
E-banking is referred to as electronic banking (internet banking). It is a service that makes use of
electronic and telecommunications network for providing banking functions. It lets customers access
their bank accounts and carry out banking transactions using their computers, laptops, tablets, or
smartphones. There are two categories of e-banking services.
29
E-shopping
The process of selling and buying things on the internet is called e-shopping. It has become very
popular among users. People can buy various things, such as toys, stationery items, clothes, cosmetics,
and household items.
Benefits of e-shopping to customers
• Online shopping is very convenient for people who are busy. They can order things online from
their home, office, or any other location.
• Online shopping also saves time as going from stores to stores and comparing prices is a challenging
and time-consuming task.
• Customers can choose from the extensive range of products available online.
• Customers can scrutinize the prices of the products from various stores by sitting in one place.
E-reservation
E-reservation means making a reservation for a service via the internet. Nowadays, e-reservation has
become more popular. A variety of tasks can be accomplished using e-reservation by sitting in one
place. We can book a hotel room, air, train or a cinema ticket, or a cab. It is also possible to even book
an appointment with a doctor. The e-reservation system saves a lot of time as it eliminates the need of
going to places and manually book tickets or make reservations.
30
E-governance
E-governance can be defined as the use of information and communications technology (ICT) tools to
make government services available for public, integrate existing services between the government and
the citizens, and provide information portals to the citizens in an efficient and transparent manner.
Benefits of e-governance
• The communication becomes faster because of the use of technology.
• The e-governance system is more efficient than the traditional paper-based system. The paper-based
system requires more printers and stationery items, which incur a lot of money.
• The e-governance system offers more flexibility, transparency, and accountability.
• It also provides better accessibility to public services.
Social networking
Social networking is a way of connecting with friends, family, customers, colleagues, or clients using
the internet. The social networking sites provide an online platform to share ideas and interests with
one another. Facebook, Google+, and Twitter are some of the popular social networking apps. Some
social networking sites, such as Socialcast, LinkedIn, and Yammer, also provide platforms for business
interactions.
To access a social networking site platform, users first need to create their accounts and digital profiles.
They can then choose to follow other members as their contacts.
31
2G
The second-generation (2G) mobile technology was used for voice communication as well as text
messaging (SMS), picture messaging, and MMS.
SMS
SMS stands for short messaging service. It is a service that is used to send short text messages from
one mobile phone to another.
MMS
MMS stands for multimedia messaging service that is used to send messages with audio, image, and
video.
3G
The third-generation (3G) of mobile technology offered higher data transmission rates. It was used to
access the internet and for video chatting.
4G
The fourth-generation of mobile technology offers higher rates of data transmission than the third
generation. This technology is used for watching high definition television (HDTV) content and
high-quality audio and video calls.
Wordbank
Search engine A service that is used to search content on the Web with the help of
keywords
Crawler A computer program used by search engines to crawl the pages on the
web and log information in a database
Chatting A way of communicating on the internet by exchanging text messages
Videoconferencing A real-time video and audio communication between two or more persons
Email An electronic message sent or received from one computer to another
using an email id
Cc A feature that allows a user to send email messages to various people at
the same time
Bcc A feature that allows a user to send email messages to various people at
the same time without letting other recipients know
32
• A browser is required to retrieve information from the Web and display the same.
• In response to a query, a search engine scans its database and returns a file containing links
to web pages related to the keyword(s) supplied.
• To search for a specific phrase, enclose it within double quotation marks (“”).
• A minus sign(–) or the Boolean NOT operator is used to exclude a word from the search.
• The Boolean AND operator is used to get links to web pages containing both the words
separated by AND, not necessarily together or in the given order.
• The Boolean OR operator is used to get links to web pages containing either of the two
words separated by OR.
• When the search is not very specific, a wildcard character asterisk (*) can be used.
• The internet also provides services to send messages to people in real-time.
• Email is one of the most commonly used services of the internet.
• An email address has the form‘username@hostname’.
• The internet offers various e-services, such as videoconferencing, e-learning, e-banking,
e-shopping, e-reservation, e-governance, and e-groups.
• The social networking sites provide a medium to interact with other people to share ideas
and interests.
• Mobile technologies have evolved over time. The changes are marked as generations of
mobile technologies.
Solved Examples
1. Name the information retrieval service on the 5. What is information retrieval service?
internet. Ans. Information retrieval refers to accessing and
Ans. World Wide Web (WWW) retrieving information on the internet. WWW is
the information retrieval service of the internet.
2. Name any three popular internet services other It contains information in the form of web
than WWW. pages. To retrieve a specific web page, we need a
Ans. Search engine, chat, and email web browser and the URL of the web page.
3. Explain the form of an email address. 6. What is a search engine?
Ans. An email address has the form ‘username@ Ans. A search engine is a service that is used to
hostname’. For example, in the email address search content on the web with the help of
[email protected], ‘abc’ is the username and specific keywords.
‘example.com’ is the hostname.
7. Explain the term ‘e-banking’.
4. What are the different parts of an email Ans. E-banking is the internet service that allows
message? a customer to get connected to their bank’s
Ans. An email message consists of two parts: header website and perform financial transactions.
and body. The header contains the information
8. What do you mean by videoconferencing?
about the recipients, such as the email address
of the recipients of the message, date, and Ans. Videoconferencing refers to real-time video
subject. The body contains the actual message and audio communication between computers
that is being sent. at different locations using the internet.
33
Exercises
t 1. Match the columns.
34
(b) Name the two parts of an email address with (f) Explain e-governance.
the help of an example.
(c) State one advantage of videoconferencing
over personal face-to-face business meetings.
l Lab Exercise
c Prepare a presentation on the various services available on the internet.
• You want some reference or help on certain topics from the internet. Which
specific sites will you search on? What are such sites called?
s
• While chatting you must have used characters like ‘:-)’. What do these characters
signify? What are they called?
• While using a social networking site, you must have noticed a term called ‘report
abuse’. What does it mean? Is it useful in any way?
36
Today, the internet has become a popular medium for the exchange of information. It is rightly called
the global information system (GIS). Whether we want to communicate with our friends, share ideas,
or search for some information, we are just a click away.
The internet allows us to do the following:
• Keep in touch and communicate with our family members and friends using email and chatting
• Gather information on any topic of interest, which can be in the form of text, image, audio,
or video
• Stay up to date with news, sports, weather, and current affairs around the world
• Locate and download computer software programs and other products that are available in
cyberspace
• Listen to music and watch films
The internet is made up of millions of computers linked together around the world. This has made it
possible to send information from a computer to any other computer across the world 24 hours a day.
The internet is a much broader term. The WWW is a part of the internet that presents information
in a graphical interface. The WWW is a collection of online documents stored on servers (computers
where data is stored) around the world that are connected to the internet. These documents are
written in a language called Hypertext Markup Language (HTML).
37
A hypertext is a text which when clicked takes the reader to a different location in the same
document or to a different document, which may be located on a different server.
A markup language encloses a piece of text between a pair of elements called tags to apply appropriate
encoding on it.
Fig. 3.1
38
Fig. 3.2
6. The file is saved on the desktop.
Viewing an HTML Document
HTML documents are viewed with the help of a software application called web browser. A web
browser interprets the HTML document, formats it as per the formatting instructions provided in the
document, and displays it in the browser’s document window on the screen. Some of the commonly
used browsers are as follows:
• Microsoft Edge
• Mozilla Firefox
• Apple Safari
• Google Chrome
The steps to view an HTML document in the Google Chrome are as follows:
1. Open Google Chrome.
2. Press Ctrl + O keys. The Open dialogue box opens.
3. Locate and select the file that you want to open.
39
Fig. 3.4
40
<!DOCTYPE html>
This element is an empty element. It tells the browser about the version of the markup language being
used. It is included at the top of the web page before all the other elements.
41
<head>
This element is also a container element. It defines the HTML header and does not affect the
appearance of the document. The header contains information about the document rather than the
information displayed in the document. The browser displays none of the information in the header,
except for the text contained by the sub-element <title>.
<title>
This element specifies the title of the document. It contains the text, which is displayed at the title
bar of the browser window. It is a container element, and every HTML document must contain this
element.
<body>
This element has the main content of the document. So, whatever appears in the browser window is
written within the <body> tag. It is also a container element.
ATTRIBUTES
The attributes of a tag are the properties associated with it. For example, consider the given line of
code.
<hr color=“red”>
Here, color is the attribute of the <hr> tag. It will show a line with red colour.
Now let us write a sample HTML code to create a web page.
<!DOCTYPE html>
<html>
<head>
<title> Creating a web page </title>
</head>
<body>
Intellectual Property Rights <br>
Intellectual property rights (IPR) are the rights assigned to the
creators of intellectual properties, which include inventions,
artistic and literary works, symbols, logos, images, names of the
companies or organizations, and designs. It is up to the creator,
42
Fig. 3.5
In the above code, note the use of the <br> tag. It is used for inserting line breaks in HTML
documents. As HTML does not accept the normal line breaks or white spaces in text, we have to use
specific elements or tags for any kind of formatting.
Syntax of CSS
A CSS contains style rules that are interpreted by the browser and then applied to the corresponding
element in an HTML document. A style rule has the following three parts:
• Selector: It is the name of the HTML tag element to which a style is applied—for example, <h1>
and <b>.
• Property: It is the type of an attribute of HTML tag—for example, color and font size.
• Value: It is the value of a property—for example, the color property can have values as red,
green, or blue.
When the selector, property, and value combine, it makes a rule. The syntax of a rule is as follows:
selector {property: value}
43
44
Fig. 3.6
46
Fig. 3.7
47
Fig. 3.8
Remember three things about the heading tag.
• The <hn> tag changes the size of the text. The <h1> heading level gives the maximum size and
<h6> gives the minimum size.
• The <hn> tag makes the text bold—that is, the thickness of text increases.
• The <hn> tag leaves one blank line above and one blank line below text. So this tag automatically
gives paragraph break.
48
Fig. 3.9
49
We have learned
50
3. Which tag is used to insert a line break in an The elements that do not have an end tag are
HTML document? called empty elements. For example, <br> and
Ans. The <br> tag is used to insert a line break. <hr> are empty elements.
4. What is the extension of HTML files? 9. What is the <title> element used for?
Ans. HTML files are saved with ‘.htm’ or ‘.html’ Ans. The <title> element specifies the title of the
extension. document. The text to be displayed as the title
of the web page is given as a parameter to the
5. Who invented HTML? <title> element. The title appears in the title
Ans. HTML was invented by Tim Berners-Lee, a bar of the browser.
scientist at CERN at the European Laboratory
for Particle Physics in Geneva, Switzerland. 10. What is a comment tag in HTML?
Ans. A comment tag (<!-- … --!>) is used to
6. Define HTML. give comments in an HTML document. The
Ans. HTML is a simple text formatting language comments are notes written by the programmer
used to create hypertext documents for the to describe or explain parts of the HTML code.
World Wide Web. They are added to help the programmer or
other people reviewing the code to understand
7. What is a hypertext? what the program is doing. Comments are not
Ans. A hypertext is a text that takes the reader to a displayed in the output on the web page.
different location in the same document or to a
different document, which may be located on a
different server.
Exercises
t 1. Match the columns.
51
(b) What is the purpose of using the <body> tag (e) What is the <title> tag?
in HTML?
52
(c) Choose the correct HTML tag for the largest <HTML><HEAD><TITLE></HEAD>
(iv)
heading size. </TITLE></HTML>
(g) Which of the following tags is used to set the
<heading>
(i)
headings in a web page?
<h1>
(ii)
<b>
(i)
<head>
(iii)
<br>
(ii)
<h6>
(iv)
<hr>
(iii)
(d) What is the correct HTML tag for inserting a
line break? <hn>
(iv)
l Lab Exercise
c (a) Create an HTML document to develop a • Set the image of the school as the
web page for your school, keeping in mind background.
the following points. • Use appropriate section headings in the
• Give the title ‘My School’ to the document. Give different font styles
document. and colours to the text.
53
• While working with HTML commands, you use logical and physical tags. What
are these tags? Name two tags of each category.
s
• Identify the error in the following code.
<style>
body {bg-color:red; bg-image:url(“img.jpg”)}
</style>
• Suneha has added an image to a web page. She wants to scroll down the image
while scrolling the web page. Help her write the code.
54
In the previous chapter, we have studied about some of the basic tags of HTML. We have also learned
to integrate CSS with HTML. In this chapter, we shall study about the tags used to format text.
FORMATTING TAGS
There are various tags in HTML that are used to format text.
Fig. 4.1
TEXT PROPERTIES
There are various text properties that are used to format text in HTML 5. Some of the properties are
described here.
56
Text align
The text-align property is used to set the horizontal alignment of text. This property is applied to
a block of text. The syntax of the property is as follows:
text-align:value
Here the value can be left, right, center, or justify.
Direction
The direction property is used to set the direction of text. The syntax is as follows:
direction:value
Here the value can be ‘ltr’ or ‘rtl’.
The value ‘ltr’ renders text from left to right, and the value ‘rtl’ renders text from right to left.
Text decoration
This property is used to decorate text. The syntax of the property is as follows:
text-decoration:value
57
Text indent
This property is used to indent the first line of text. The syntax of this property is as follows:
text-indent:value
Here the value can be a number in pixels or percentage.
Letter spacing
This property is used to increase or decrease the blank
Try it out t s
Create a heading level 2 and do the
space between the letters of a word. The syntax of the
following:
property is as follows:
• Set the font colour to yellow.
letter-spacing:value
• Underline text.
Here the value can be a number in pixels.
• Set the alignment of text to right.
Word spacing
This property is used to increase or decrease the space between the words of a sentence. The syntax of
the property is as follows:
word-spacing:value
Here the value can be a number in pixels.
Line height
The line-height property is used to specify the vertical space between two lines of text. The syntax of
the property is as follows:
line-height:value
Here the possible values can be numbers, percentages, lengths, or normal. The value ‘normal’ is the
default value of the line-height property.
Text transform
The text-transform property is used to specify the capitalization of text. The syntax of this
property is as follows:
text-transform:value
Here the possible values can be as follows:
• none—to keep text as it is
• capitalize—to capitalize the first letter of each word
• uppercase—to convert all letters into upper case
• lowercase—to convert all letters into lower case
58
59
Fig. 4.2
FONT PROPERTIES
The font properties are used to change the font, font style, and font size. The property is used in
different parts in the following ways.
Font
The font of text can be changed using the font-family property. The syntax of the font-
family property is as follows:
font-family:font name
Here ‘font name’ is the name of the font. For example, it can have values as ‘Arial’, ‘Times New Roman’,
‘Calibri’, and so on.
Font size
The size of text can be modified using the font-size property.
Did You Know?
60
61
MARGIN PROPERTY
The margin property is used to set the margin around text. The syntax of the property is as follows:
margin:left value right value top value bottom value
These values can be given in terms of px (pixels), cm (centimeter), pt (point), or % (percentage).
Note the following points about the margin property.
• If the margin property has only three values, say 5px
10px 15px, then the top margin is 5px; the right and
Try it out t s
left margins are 10 px; and the bottom margin is What will happen if you specify negative
15px. values in the margin property as given
below?
• If the margin property has only two values, say 5px
10px, then the top and bottom margins are 5px; and <style type=“text/css”>
the right and left margins are 10px. h1{margin: -100px -200px 100px
• If the margin property has only one value, say 5px, 200px}
then all the four margins are 5px. </style>
Example 4: An HTML program that makes use of
the margin properties
<html>
<head>
<title> Font formatting tags </title>
</head>
<style type=“text/css”>
body{background-color:lightgray; color:red; font-family:Calibri;
62
Fig. 4.4
63
Border style
The border-style property is used to set a border around four sides of an element. It can have
one to four values. The possible values are none, dotted, solid, dashed, double, groove, inset, outset,
and ridge.
Now, observe the syntax given below.
border-style:dotted solid dashed double
Here the top border is dotted, right border is solid, bottom border is dashed, and left border is double.
• If the border-style property has only three values, say dotted solid double, then the top border
is dotted; the right and left border styles are solid; and the bottom border style is double.
• If the border-style property has only two values, say dotted solid, then the top and bottom
border styles are dotted; and the right and left border styles are solid.
• If the border-style property has only one value, say dotted, then all the four borders are dotted.
Border width
The border-width property is used to set the thickness of the border of all the four sides. The
syntax of the property is as follows:
border-width:value
Here the possible values can be thin, thick, medium, or a number in pixels. The default value is
medium.
Border color
The border-color property is used to set the colour of the border. The syntax of the property is as
follows:
border-color:value
Here the value can be a colour name or a hexadecimal colour code.
Example 5: An HTML program that makes use of the border properties
<html>
<head>
<title> Font formatting tags </title>
</head>
<style type=“text/css”>
body{background-color:lightgray; color:red; font-family:Calibri; font-
size:large; margin:80px 80px 80px 80px}
64
Fig. 4.5
65
Note: There are various ways of specifying the URL or location of the image file in the src
attribute of the <img> tag.
(i) Absolute URL: Here, you specify the complete path of the image file. For example, on your
local computer the code would look like src=“F:\Projects\sarikavimal\html examples\apple1.
jpeg”.
(ii) Relative URL: Here, you specify the path of the image file with respect to the HTML file.
(a) The image file and the HTML file are in the same folder: In this case, simply specify the
name of the image file. For example, src=“apple1.jpeg”.
(b) The image file is inside a sub-folder containing the HTML file: In this case, for example, if
the image file is in a folder ‘Examples’ whereas the HTML file and the Examples folder are
in the same folder, then the code would be like src=“/Examples/apple1.jpeg/”.
66
67
Fig. 4.6
Fig. 4.7
68
69
Fig. 4.9
Fig. 4.10
71
Link states
In HTML, by default, the links are indicated by different colours in all the web browsers. These are as
follows:
• An active link is red and underlined.
• A visited link is purple and underlined.
• An unvisited link is blue and underlined.
Using CSS properties, we can specify the colour of the link based on the action performed. There are
four link states as described here.
• a:link: a simple, unvisited link
• a:visited: a link that has been visited
• a:hover: a link when the user moves the mouse pointer over it
• a:active: a link that is active
Now take a look at the following code snippet to understand how to apply colours to links.
<style type=“text/css”>
a:link{color:blue}
a:visited{color:green}
a:hover{color:orange}
a:active{color:yellow}
</style>
Note: The a:active property must come after a:hover, and the a:hover property must come
after a:link and a:visited properties.
72
Fig. 4.11
73
Fig. 4.12
Code for big.html
<!DOCTYPE html>
<html>
<head>
<title> An image as a hyperlink </title>
<style type=“text/css”>
body{background-color:lightgray; color:blue}
img{border-style:double}
hr{margin:1cm}
</style>
74
Fig. 4.13
75
Fig. 4.14
Wordbank
76
• The <img> tag is used to insert images on a web page. It does not have a closing tag and is
therefore an empty element.
• The src attribute is the most important attribute of the <img> tag because it specifies the
location or URL of the image to be displayed in the document.
• The alt attribute is used to specify alternate text for an image.
• The height and width attributes of the <img> tag are used to specify the height and width of
the image respectively.
• A hyperlink is created using the <a> tag. It is a container element.
• The href attribute of the <a> tag is used to specify the url of the destination.
• Any object (whether it is text or an image) can be made a hyperlink.
• A link is active when you have clicked on it but have not released the mouse button.
Solved Examples
1. Which tag is used to italicize text? Ans. The <a> tag is used to create links on a web
Ans. The <i> tag is used to italicize text. page.
2. Which property is used to set the horizontal 7. What is the default colour of a link on a web
alignment of text? page?
Ans. The text-align property is used to set the Ans. Blue
horizontal alignment of text.
8. Where do you specify the URL of the linked
3. Name the property used to set the colour of the page in the <a> tag?
border. Ans. The URL of the linked page is given as the
Ans. The border-color property is used to set value of the ‘href ’ attribute in the <a> tag.
the colour of the border.
9. Which global attribute is used to add a text pop-
4. Which tag is used to insert an image on a web up to <a> tag?
page? Ans. The ‘title’ attribute can be used with the <a>
Ans. The <img> tag is used to insert images on a tag.
web image.
10. How can we control the size of the image on
5. Which attribute of the <img> tag is used to the web page?
specify the URL of the image file? Ans. The size of the image can be adjusted using the
Ans. The ‘src’ attribute is used to specify the URL of ‘height’ and ‘width’ attributes of the <img> tab.
the image file.
11. Write the syntax to create an email link on a
6. Name the tag that is used to create links on a web page.
web page. Ans. <a href=“mailto:[email protected]”>
Click on this link!</a>
77
78
79
l Lab Exercise
c (a) Write the HTML code to create a web page to ‘questionnaire.html’. Create a hyperlink on
show the information on reflection of light. this page that should be linked to another
Use a suitable background colour, font type, page, saved as ‘answers.html’, containing
and font size. Also insert images wherever answers to the questions.
required.
(c) Write the HTML source code on internet
(b) Create two linked pages in HTML. The first and its applications. Format text using
page should display multiple choice questions appropriate CSS properties. Also, add images
on HTML and CSS and should be saved as supporting text.
• Using the <a> tag you can also create a link to your email address. Can you
find out how?
s
• When you use the <a> tag, the link opens in the same window. Which attribute of the
<a> tag is used to open the hyperlink in a new browser window?
80
Sometimes we need to arrange our data items in the form of lists. A list helps to present information
in a better way.
HTML LISTS
In HTML, there are three different types of lists that can be created. These are ordered list, unordered
list, and description list.
An ordered list is used to generate a list of items in a specific order. An unordered list is used to create
a list where there is no specific preference for the items. The definition lists are used for generating a
lists of terms with their definitions, such as a glossary.
81
82
Value Output
1 1, 2, 3, ...
a a, b, c, ...
A A, B, C, ...
i i, ii, iii, ...
I I, II, III, ...
83
Fig. 5.2
84
85
86
Fig. 5.4
87
Fig. 5.5
NESTED LISTS
Nested lists refer to lists within lists. Nesting happens when some list item in a list may further
contain a sub-list. In HTML, we can nest one type of list within another.
Let us write a code to show nesting of lists.
<!DOCTYPE html>
<html>
<head>
<title>list demo</title>
<style type=“text/css”>
body{color:purple}
</style>
</head>
<body>
<ol type=A>
<li>Introduction</<li>
88
Fig. 5.6
Example 1: Program to display nesting of unordered lists inside the ordered lists
<!DOCTYPE html>
<html>
<head>
<title>Nested list demo:nesting dissimilar lists</title>
<style type=“text/css”>
body{color:purple}
ul{list-style-type:circle}
</style>
</head>
89
Fig. 5.7
Example 2: Program to demonstrate the nesting of a definition list inside an ordered list
<!DOCTYPE html>
<html>
<head>
<title>Nested list involving definition lists</title>
<style type=“text/css”>
body{color:purple}
ul{list-style-type:circle}
90
Fig. 5.8
91
92
93
94
95
96
97
Fig. 5.12
98
Fig. 5.13
99
We have learned
• The ‘start’ attribute of the <ol> tag indicates the starting number for an ordered list.
• The ‘type’ attribute of <ul> list defines the type of bullet used for each list item.
• Definition lists are used for creating a glossary, which contains various terms and their
definitions.
• A table is used to arrange data in the form of rows and columns.
• The ‘border’ property is used with the <table>, <th>, and <td> tags to specify the border
around the cells or a table.
• The ‘padding’ property is used to specify the spacing between the border and content of the
cell.
• The <caption> tag is a container element, which is used to give a caption to the table.
• The ‘colspan’ attribute of the <th> or <td> tag is used to merge two or more columns in a
row.
• The ‘rowspan’ attribute of the <th> or <td> tag is used to merge two or more rows in a
column.
Solved Examples
1. Which CSS property is used with the <table> 4. Name the tags used to create numbered and
tag to adjust the space between the cell content bulleted lists.
and its border? Ans. The <ol> tag is used to create a numbered list,
Ans. The ‘padding’ property is used to adjust the while the <ul> tag is used to create a bulleted
space between the cell content and its border. list.
2. Name the attribute of the <ol> tag that is used 5. What is the use of a definition list?
to specify the starting number of a list. Ans. Definition lists are used for creating a glossary,
Ans. The ‘start’ attribute is used to specify the which contains various terms and
starting number of a list. their definitions.
3. Which CSS property is used with the <ul> tag 6. What is a nested list?
to change the type of list? Ans. When one or more items of a list contain a
Ans. list-style–type:disc|square| sublist, the list is called a nested list.
circle
100
Exercises
t
1. Match the columns.
101
(iii) Definition list (e) Which property is used to specify the vertical
alignment of data in a cell?
(b) Write the expansions of the following tags
used in HTML: (f) Name the element that defines the caption of
a table.
<ol>
(i)
<li>
(ii)
(v) <td>A2</td>
</tr>
Top
middle up <tr>
way left way right
middle down <td>B1</th>
103
104
105
(b) Write the HTML code to generate the web page given here.
106
(c) Write the HTML code to generate the web page given below.
(i) The background colour of the page (iv) The text ‘County Holidays’ should be
should be ‘pink’ and visited link colour in ‘red’.
should be ‘green’. (v) Save the linked pages as given below:
(ii) The font type should be ‘Arial’. • Agra Packages as ‘agra.html’
(iii) The text colour of the main heading • Rajasthan Packages as ‘raj.html’
should be ‘maroon’.
107
(i) The title of the page should be (iii) The font type should be set to ‘Arial’.
‘Wildlife’. (iv) Save the linked pages as given below:
(ii) The background colour of the page • Wildlife in the park as ‘wild.html’
should be ‘silver’, link colour should be
‘maroon’, visited link colour should be • Birdlife in the park as ‘bird.html’
‘red’.
108
(i) The background colour of the page (vi) Save the linked pages as given below:
should be ‘yellow’ and visited link • Clothing and accessories as ‘cloth.
colour should be ‘green’. html’
(ii) The title of the page is ‘Stop n Shop’.
• Home appliances as ‘house.html’
(iii) The colour of the text of the main
• Electronic products as ‘electronics.
heading should be ‘maroon’.
html’
(iv) The font type should be ‘Arial’.
(v) Use the concept of the nested list to
display the given list.
• How can you add an image to the background of every cell in a table?
s
• How can you view more than one HTML document in one browser window?
109
110
Fig. 6.1
111
FORMS IN HTML
There are times when we need to accept input from a user on a webpage. For such tasks, we use
HTML Forms. Take an example of accepting a user id and password while logging into an email
112
CREATING A FORM
A form begins with the <form> tag and ends with the </form> tag. All the other content is placed
between these two tags. The general syntax of the <form> tag is as follows:
<form name=“form name” method=“get|post” action=mailto:“email
address”></form>
Text Field
To accept a single-line text entry, the <input> tag is used, where its ‘type’ attribute has a value of text.
The text includes user id, password, or name of the file to be uploaded. The syntax of the <input>
tag is as follows:
<input type=“text” name=“t1” value=“data” maxlength=“maximum length”
size=“size of the input box”>
The tag has the following attributes.
• type: This attribute of the input tag specifies what type of input is required to be accepted. In this
case, it is the single-line input field, which is used to take inputs like user id, name, and so on.
Hence type=“text”.
113
Fig. 6.3
In the above example, the first textbox has the size of ‘20’, which means it can show a maximum of 20
letters. It has the default value as ‘Enter your name!’, which gets displayed when the form is loaded on
the browser. The attribute ‘maxlength’ has the value of 15, which means that it permits only 15 letters
to be entered. The same is the case with the second textbox.
114
Fig. 6.4
115
Fig. 6.5
116
Checkbox
When we need to choose one or more options from a predefined set of options, we use checkboxes.
The syntax of creating checkboxes is as follows:
<input type=“checkbox” name=“c1” checked value=“value”>
• name: This attribute is used to give a name to the checkbox as there are multiple checkboxes in a
form. It can be any name. Different names are given to different checkboxes.
• value: The value of this attribute for the selected checkbox is sent to the server when a form is
submitted.
• checked: This attribute is specified for the checkbox which is required to be shown selected by
default, when the form gets loaded on the browser.
Now observe the following example.
<html>
<body>
<form name=“form1” method=“post” action=“mailto:[email protected]”>
<br>User id:<input type=“text” size=“20” maxlength=“30” value=“--Enter
id here--”>
<br><br>Password:<input type=“password” size=“20”>
<br> <br>Name: <input type=“text” size=“20” maxlength=“30” value=“--
Enter name here--”><br>
<br><br>Gender:<input type=“radio” name=“r” value=“male”>Male
<input type=“radio” name=“r” value=“female” checked>Female
<input type=“radio” name=“r” value=“other”>Other <br>
<br>Sports I like:<br>
<input type=“checkbox” name=“c1” value=“cricket”>Cricket<br>
<input type=“checkbox” name=“c2” value=“football”>Football<br>
<input type=“checkbox” name=“c3” value=“tennis”>Tennis<br>
<input type=“checkbox” name=“c4” value=“badminton”>Badminton<br>
<input type=“checkbox” name=“c5” value=“chess”>Chess<br>
<input type=“checkbox” name=“c6” value=“basketball”>Basketball<br>
</form>
</body>
</html>
117
Submit button
This type of input field is used to send the form to the email address specified in the ‘action’ attribute
of the <form> tag. The <input> tag is used to create a submit button. The ‘type’ attribute has the
value ‘submit’.
<input type=“submit”>
The other attributes of the button are as follows:
Did You Know? In HTML, the <button> tag
• name: It is used to give a name to the button.
is used to create clickable
• value: It is the text that appears on the button. buttons. For example,
The following program illustrates how to use a <button> Click here
submit button. </button> will create
a button.
<html>
<body>
<form name=“form1” method=“post” action=“mailto:[email protected]”>
<br>User id:<input type=“text” size=“20” maxlength=“30” value=“--Enter
id here--”>
<br><br>Password:<input type=“password” size=“20”>
<br> <br>Name: <input type=“text” size=“20” maxlength=“30” value=“--
Enter name here--”><br>
<br><br>Gender:<input type=“radio” name=“r” value=“male”>Male
<input type=“radio” name=“r” value=“female” checked>Female
<input type=“radio” name=“r” value=“other”>Other <br>
<br>Sports I like:<br>
<input type=“checkbox” name=“c1” value=“cricket”>Cricket<br>
118
Fig. 6.7
Reset button
The reset button is used to clear the data in the fields of the form entered by a user. The reset button
can be created in a similar way as the submit button, using the <input> tag. The only difference is
that the ‘type’ attribute has the value reset.
The following program illustrates how to create a reset button.
<html>
<body>
<form name=“form1” method=“post” action=“mailto:[email protected]”>
<br>User id:<input type=“text” size=“20” maxlength=“30” value=“--Enter
id here--”>
<br><br>Password:<input type=“password” size=“20”>
<br> <br>Name: <input type=“text” size=“20” maxlength=“30” value=“--
Enter name here--”><br>
<br><br>Gender:<input type=“radio” name=“r” value=“male”>Male
<input type=“radio” name=“r” value=“female” checked>Female
119
Fig. 6.8
TEXTAREA ELEMENT
To enter multiline text, the <textarea> input control element is used. It lets users enter more than
one line of text. The best example of multiline input field is the comment section in a form where
you can write in more than one line. The multiline input field can be created using the <textarea>
element. The syntax of the <textarea> element is as follows:
<textarea name=“name” rows=“number of lines” cols=“number of
characters in a line”></textarea>
The attributes of <textarea> are as follows:
• name: This attribute is used to give a name to a textarea field as there can be multiple textarea fields
in a single HTML form.
120
121
DROP-DOWN LISTS
Drop-down lists are useful when there are several options to choose from. It is also referred to as the
pull-down menu or list. On clicking the drop-down arrow, a menu appears with multiple option. You
can select the desired option from the menu.
Select element
To create a drop-down list, the <select> element is used. It is a container element. The syntax of
the <select> element is as follows:
<select name=“list name” size=“number of options visible”
multiple></select>
The following attributes are associated with the <select> element.
• name: This attribute is used to give a name to a drop-down list as there can be multiple lists in a
single HTML form.
• size: This attribute specifies the number of options visible in a drop-down list. By default, only one
option is visible at a time in a drop-down list.
• multiple: Only one option can be selected in a drop-down list, by default. But to choose multiple
options (by pressing the Ctrl key), the multiple option should be specified.
Option tag
To specify options in a drop-down list, the <option> tag is used. It is used inside the
<select> tag.
Let us observe the example given below, which creates a drop-down list.
122
123
SCROLLING LISTS
The scrolling lists are the lists that display two or more available options in a list at a time. Two
arrows—up and down—are displayed in the control. The user is required to click on these arrows to
view all the available options. If all the options are displayed, the scroll arrow buttons disappear.
The scrolling list can also be created using the <select> and <option> tags. The attributes that
are required to create a scrolling list are as follows:
• size: The ‘size’ attribute is used to specify the number of options that a scrolling list should show.
For example, if size=“3”, then only two options will be shown in a scrolling list.
• selected: This attribute is used to specify or show the default option. The default option will be
displayed when the web page is loaded.
The program given below will display a scrolling list when run on a web browser.
<html>
<body>
<form name=“form1” method=“post” action=“mailto:[email protected]”>
<br>User id:<input type=“text” size=“20” maxlength=“30” value=“--Enter
id here--”>
<br><br>Password:<input type=“password” size=“20”>
<br><br>Name: <input type=“text” size=“20” maxlength=“30” value=“--
Enter name here--”><br>
<br><br>Gender:<input type=“radio” name=“r” value=“male”>Male
<input type=“radio” name=“r” value=“female” checked>Female
<input type=“radio” name=“r” value=“other”>Other <br>
124
Fig. 6.11
125
Input element The tag used to specify different types of input fields
Textarea element The tag used to enter multiple lines of text
Drop-down list A list with several options
Scrolling list A list that displays two or more available options in a list at a time
We have learned
• The <audio> and <video> tags are used to insert audio and video respectively on a web
page.
• A form is created to take input from a user.
• The <form> tag is used to create a form.
• The <input> tag is used to create input fields, such as text, password, radio button,
checkbox, or submit and reset buttons.
• To create a drop-down list, the <select> tag is used.
• The <option> tag is used to define the items in a drop-down list. It is nested inside the
<select> tag.
• A scrolling list can be created using the <select> and <option> tags.
Solved Examples
1. Differentiate between a radio button and a 3. What are the values of the ‘method’ attribute of
checkbox element in a form. the <form> tag?
Ans: A radio button in a form allows the user to Ans: The ‘get’ and ‘post’ are the two values of the
choose one out of the given choices. A selection method attribute of the <form> tag.
can be deselected by selecting the other radio
button in the group. 4. Name any two attributes of the <audio> tag?
A checkbox places a toggle on the form. Ans: The ‘src’ and ‘autoplay’ are the two attributes of
The user is allowed to select more than the <audio> tag.
one checkbox at a time. A checkbox can be
5. Which tag is used to insert a video clip in
deselected by clicking on it once again.
an HTML based web page? Write any two
2. Differentiate between the ‘maxlength’ and ‘size’ attributes of the tag.
attributes of <input type=“text”> field. Ans: The <video> tag is used to insert a video in
Ans: The ‘maxlength’ attribute specifies the an HTML-based web page. Its attributes are
maximum number of characters a textbox ‘autoplay’ and ‘src’.
can accept. The ‘size’ attribute specifies the
length of the input field in terms of number of
characters.
126
Exercises
(b) Differentiate between the following: (e) Which attribute of the <form> tag is
responsible for sending the form to the
<input type=“text”> and
(i)
destination email address?
<input type=“password”>
<input type=“text”> and
(ii)
<textarea>
<video>
(i) <input type=“checkbox”
checked>Research<br>
<form>
(ii)
<input type=“checkbox”
<input type=“submit”>
(iii)
checked>Games<br>
(c) How is <input type=“password”> tag
<textarea cols=10
different from <input type=“text”>?
rows=10>General information
Explain with the help of an example.
</textarea>
(d) Why do we need to give the same name to
</form>
the group of radio buttons?
</body>
(e) Give the output for the following HTML
code. </html>
<html> (f) Find the errors and correct the HTML codes
given below.
<body>
<html>
(i)
<form name=“n1”>
<head>
Enter your name
<title> Inserting video
<input type=“text” maxlength=10 </title>
size=6><br>
<style type=“text/css”>
Do you use computers?
h4{color:navy}
<input type=“radio” checked <h4>Click on the play
name=“n2”>Yes button to watch the
128
129
(c) Write the HTML code to create an email registration form as shown below.
• Find out the type of audio and video file formats supported by HTML 5.
s
• There are various input types for form validation in HTML 5. Find out and prepare a
Word doc for the same. Also, write an HTML program to show the usage of the tags.
[Hint: input type=“email”>
130
The information technology (IT) has undergone through major advancements in recent past years.
The world has witnessed a digital revolution driven by these advancements. Today we communicate,
conduct business, learn, conduct research, and do lots of other things through the IT tools. The
internet, which is the driving force behind the IT revolution, has made our lives easy. As the internet
has become an important part of our lives, there are certain risks as well associated with its use.
Moreover, with the advancement in the technology, the level of threats and risks has also increased,
which pose a challenge for us. Thus, it has become the responsibility of every user to not only be
aware of the rules to work on the online platform but also to follow them. Cyberethics is a set of rules
or a code of behaviour a user must follow to make cyberspace a safe place.
NETIQUETTE
One must follow an appropriate code of conduct while writing emails, in chat rooms, and using the
social networking sites. A set of rules or behaviour among the internet users is called netiquette. These
rules describe how one should behave while using the online platform. Some of the general netiquette
one must follow are discussed further.
• Show respect to other users: It is very similar to how we expect others to treat us in real life. We
should be careful with the words we use while addressing people on the online platform and show
proper mannerism.
• Use appropriate language: We usually use informal language while interacting with our friends
and the similar habit continues when we interact within a close group or on social networking
websites. We must remember that we are judged on the online platform by what we write and post.
So, we must be very careful with the language we use online, especially on platforms like discussion
groups.
131
PLAGIARISM
Plagiarism is an act of copying, stealing, or selling someone else’s original work or idea as one’s own.
It is the infringement of copyright. One of the most common examples of plagiarism is the easy
availability of the pirated CDs of films. The other areas where plagiarism is commonly seen is copying
someone’s original ideas from their text material, images, or website without a prior approval.
Some of the common types of plagiarism are discussed further.
• Paraphrasing plagiarism: This type of plagiarism happens when a person takes an author’s work,
makes a few changes in it, and uses it without citing the author or providing the corresponding
reference.
132
FREEDOM OF INFORMATION
Freedom of Information (FOI), or the right to information, can be defined as the right to access
information held by public bodies. It is an integral part of the fundamental right of freedom of
expression, as recognised by Resolution 59 of the UN General Assembly adopted in 1946, as well as
by Article 19 of the Universal Declaration of Human Rights (1948).
This specifies that everyone who has access to information and communication technology (ICT) can
take the information available online. But sometimes this freedom of information is hindered by the
digital divide.
DIGITAL DIVIDE
The term ‘digital divide’ is used to refer to the gap between those who have access to information
and communication technology (ICT) and those who have limited or no access. The divide is quite
evident in developing countries like India. For example, people in urban areas have greater access
to ICT. On the other hand, people from economically or socially backward sections either do not
have access or do not have the resources. In rural areas, lower literacy rates and lack of skills to use
computers or technologies are also responsible for many people not being able to access ICT. The lack
of infrastructure in some areas, such as remote and hilly areas, can be a reason for people not being
able to access ICT.
133
E-COMMERCE
E-commerce, also known as electronic commerce, is the process of buying or selling of goods and
services on the internet. In a simple language, e-commerce is the online business between two
parties where—
• the transaction is done under mutually acceptable conditions and
• the transaction depends on each other’s trust.
The e-commerce activities have increased rapidly over a last few years. Today, almost everyone with an
134
Internet privacy
Privacy or internet privacy refers to protecting sensitive data on the internet. Without the internet
privacy, someone can gain access to our personal data and may potentially cause problems. Internet
privacy is important as it keeps hackers away from accessing into and spying on our online accounts.
Almost all websites have a privacy policy, which helps users understand what information the websites
collect, why they collect it, and how the users can update or delete that information. Website owners
also collect information about the user’s web surfing habits using the cookies. It is advisable to delete
cookies as attackers could steal them to gain access to the online accounts.
Fraud
Online frauds have increased tremendously with increasing e-commerce transactions. Following are
some of the ways to secure data.
Spyware
Spyware is an offline software application that gets user’s personal information and crucial data
without the user’s knowledge. When the system is online, the data is sent to the spyware server.
Spyware may also harm computer’s performance by installing malicious software.
Phishing
Phishing is an act where a hacker steals user data, security PINs, account number, credit or debit card
details, and passwords. The hackers pretend themselves to be a trustworthy person. They can then
make online transactions or purchases using the credit or debit card of the victim.
Email web bugs
Email web bugs are small objects or images that are embedded in an email or a web page. They find
their way to a computer system when we click on the emails or the web pages. These bugs monitor
user’s activity when they are online. The bugs gather information and user’s IP address to target them
to steal their personal information.
Security of information
Security of information is a practice of preventing unlawful access, use, modification, and loss of
the sensitive information. People known as hackers may aim at stealing user’s private data. Some
malicious software, such as virus, trojan horse, and worm, may also get into the computer system to
corrupt data.
Hacking means unauthorized access to a computer system. A hacker, responsible for carrying out such
an act, is a person with an advanced knowledge of operating systems and programming languages.
Hackers can be of different types. Some hackers, known as white hat hackers, do not have intentions
to damage any data but have complete access to a computer. On the other hand, some hackers, known
as black hat hackers, have intentions to gain unauthorized access and destroy vital data or violate a
system’s integrity using remote machines.
135
Security measures
Following security measures should be taken to ensure secured online transactions.
Encryption
Encryption is the method in which data is converted to an encoded form to protect it from an
unauthorized person. Data is encoded using some algorithms. The encoded data is referred to as
ciphertext. Data can be decoded only when a user has the decryption key. Decryption is the process of
converting the encoded data back to the plain text.
Two different keys called key pair are used in encryption and decryption. One of the keys is used to
encrypt the data and the other one is used to decrypt the data. The two keys in the pair are as follows:
136
Wordbank
Cyberethics A set of rules or code of behaviour a user must follow to make cyberspace
a safe place
Netiquette A set of rules or behaviour among the internet users
Intellectual Legal rights assigned to the creators of intellectual properties, which
property rights include inventions, artistic and literary works, logos, images, names of the
companies or organizations, and designs
Copyright Rights that protect the creative work, such as literature, plays, books,
images, films, music, paintings, photographs, architectural designs, and
computer software programs
Patents A right granted for the inventions and products, which gives protection
from selling or importing the original work
Trademark A logo or symbol that distinguishes the goods or services provided by a
company from other similar companies
Industrial design Rights that protect the visual design of a product
rights
Plagiarism An act of copying, stealing, or selling someone else’s original work or idea
Digital property Rights that refer to gaining the control of and access to the digital
rights information
Digital divide The gap between those who have access to information and
communication technology (ICT) and those who have limited or no
access
Software license A legal document or agreement that has the guidelines for the use and
copyrights of software
137
We have learned
138
Solved Examples
1. What do you understand by the term • Mosaic plagiarism: In this type of
‘netiquette’? plagiarism, the person by replacing a few
Ans. A set of rules or behaviour among the internet words republishes or forwards the content as
users is called netiquette. These rules describe his or her own material.
how one should behave while using an online
• Direct plagiarism: It is also known as copy
platform.
and paste plagiarism as in this case the person
2. What is an open-source software application? copies the original idea or material from the
Ans. An open-source software application contains source and republishes as his or her own
the source code of the program with the without making any changes.
license, which enables users to not only install • Self-plagiarism: As the name suggests,
and read it but also to edit and redistribute it here the authors copy their own published
with changes. work and reuses it. It can be intentional or
unintentional.
3. Give an example of an open-source operating
system. 5. Can your carelessness lead to a fraud in
Ans. Linux e-commerce? If yes, how?
Ans. Yes, carelessness can definitely lead to a fraud
4. Explain the types of plagiarism. in e-commerce. For example, while doing
Ans. Some of the common types of plagiarism are as an online purchase, if you share your credit
follows: or debit card details or store them on the
• Paraphrasing plagiarism: This type of computer, then the hackers can easily access
plagiarism happens when a person takes an them using malware leading to a fraud.
author’s work, makes a few changes in it, and
uses it without citing the author or providing 6. Explain the terms ‘encryption’ and ‘decryption’.
the corresponding reference. Ans. Encryption is the method in which data is
converted to an encoded form to protect it
• Accidental plagiarism: This type of from an unauthorized person. Data is encoded
plagiarism occurs when a person takes using some algorithms. The encoded data is
reference from a website or from someone’s referred to as ciphertext. Decryption is the
original material but forgets to mention the process of converting the encoded data back to
source in the form of the website link or the plain text.
author’s name.
139
(b) Antivirus (ii) A software program that protects a computer from computer viruses
(c) E-commerce (iii) A term commonly used under intellectual property right
140
(b) Who defined the GNUs General Public (d) Which of the following non-profit
License? corporations is formed to educate people
(i) Richard Stallman about the benefits of open-source software
programs?
(ii) Tim Berners-Lee
(i) GPL
(iii) Linus Torvalds
(ii) FSF
(iv) Charles Babbage
(iii) OSI
(iv) IPR
141
l Lab Exercise
c Collect information on ‘How a digital certificate works’, and create a Word document.
142
Fig. 8.1
143
Data types
Data types are used to classify different types of data. A data type defines the type of operations that
can be performed on the data. The different data types in Python are listed below.
• int: Used for storing non-decimal integer values
• long: Used for storing long integers; can also be represented in octal and hexadecimal
• float: Used for storing floating-point real values
• string: Used for storing a set of characters represented in quotation marks
• list: Used for storing items separated by commas and enclosed within square brackets ([])
• tuple: Used for storing a number of values separated by commas
Note that unlike lists tuples are enclosed within parentheses. The main difference between lists and
tuples is that the elements and size can be changed in a list while a tuple cannot be updated.
Operators in Python
Python supports many operators for calculations or comparisons. The table given below describes
each type of operator.
144
Operators Descriptions
** Exponent (raise to the power)
+, − Unary plus and unary minus
*, /, //, % Multiply, divide, floor division, and modulus
+, − Addition and subtraction
<=, <, >, >= Comparison operators
==, != Equality operators
=, +=, -=, *=, %=, /=, //= Assignment operators
and, or, not Logical operators
Input statement
When we need to accept input into a variable, we use the input() function. The general syntax of the
input() statement is as follows:
A=input(“Enter a number”)
When this statement is executed, it will prompt the user to enter a number. The input provided by
the user gets stored in variable A. By default, the value given using the input function is a string or a
character value.
Now observe the code given below.
Fig. 8.2
In this example, when we tried to add the values stored in variable A, the interpreter concatenated
the value in variable A because it is stored as a string not a number. To convert a string value into an
integer, we use the int() function. The above program can be rewritten using the int() function as
shown in Fig. 8.3.
145
Comments
Comments are the statements that are ignored by the interpreter and are not displayed as a part of the
output on the screen. It sometimes becomes difficult for the programmers to read and understand
large pieces of codes with hundreds or thousands of lines of code. Therefore, the programmers use
the comments to describe large pieces of code.
In Python, a comment is defined by the symbol hash (#). When a hash symbol is placed in the
beginning of a line of code, the Python interpreter takes it as a comment that does not execute the
line. For example, consider the following lines of code.
# This is a comment.
print (“Today is Sunday.”) #The print statement will display ‘Today is Sunday.’
CONDITIONAL STATEMENTS
In a programming language, whenever we need to make decisions based on a condition, we use the
conditional statements. For example, to check if variable Num has the value 5 or not, we provide a
146
The if statement
The if statement runs only if the condition is True. The syntax of the conditional statement is
as follows:
if expression:
statement(s)
Now observe the program given below that makes use of the if statement. The program checks if the
weight of the luggage entered by the user exceeds the given limit. If the limit exceeds, the message
‘Please pay `3000 for the extra luggage weight’ appears.
Fig. 8.4
Fig. 8.5
147
Fig. 8.6
In the above program, if the user enters a number that is divisible by 2, the message ‘It is an even
number.’ is displayed. If the user enters a number that is not divisible by 2, then the message ‘It is an
odd number.’ is displayed. The output of the program is given below.
Fig. 8.7
Example 2: To check if the number entered by a user is positive or negative
Fig. 8.8
148
Example 3: To check whether a number is greater than, smaller than, or equal to another number
Fig. 8.10
In the above program, the if block checks if
the first number is greater than the second Try it out t s
number and displays the corresponding Accept temperature in degree Fahrenheit and
message. If the condition evaluates to False, convert it into degrees Celsius. Display the following
the control of the program goes to the elif messages according to the given conditions:
block. The condition in the elif block is
checked, and if it evaluates to True, the • If the temperature is between 5 and 15 degrees
corresponding message is displayed. If the Celsius, display ‘Cool’.
condition evaluates to False, the control • If the temperature is greater than 15 and less
jumps to the else statement, and the than 39 degrees Celsius, display ‘Moderate’.
corresponding message is displayed. The
• If the temperature is greater than 39 degrees
output of the above program is given below.
Celsius, display ‘Hot’.
Fig. 8.11
LOOPS
When we need to repeat a series of instructions, we use loops. In programming languages, loops
are used to execute a block of code for a specific number of times. There are two types of loops—for
and while.
149
150
for i in range (1, 5, 1): 1 Here, the start parameter is 1, the end parameter is 5,
and the step value is 1. So the loop will be executed
print (i) 2
from 1 to 4.
3
4
for i in range(2, 4): 2 Here, start=2, end=4, and step=1 (by default) as it is
not specified. So the loop will be executed from 2 to 3.
print (i) 3
for i in range(4): 0 Here, the start parameter is not specified. So its default
value is 0. The end parameter is 4, and the default step
print (i) 1
value is 1. Thus, the loop will be executed from 0 to 3.
2
3
for i in range(2, 8, 3): 2 Here, start=2, end=8, and step=3. So the loop will
start from 2, and then as the step value 3 is added
print (i) 5
it will print 5. But when 3 is further added to 5, it
becomes 8. Since the last value printed should be
end−1, it will not be printed.
Break statement
The break statement is used when we need to come out of the loop forcefully and need not continue
with the execution further. For example, consider the program given in the table. The program will
keep on printing the letters till the letter ‘e’ is encountered.
151
Continue statement
The continue statement is used to skip the code inside a loop (while or for). It returns the control of
the loop to the top by skipping the rest of the statements inside the loop. For example, consider the
program given below. It will continue to print all the letters in the string except the letter ‘e’.
Example 4: Program to skip the odd numbers and print only the even numbers in a given range of
values
Fig. 8.12 Fig. 8.13
152
Fig. 8.14
In the above program, initially the value of variable x is equal to 1. The while statement checks if the
value of x is either less than or equal to 5. If the value is less than or equal to 5, the next blocks of
statements get executed. If the value is greater than 5, the program control gets out of the while loop
and executes the statements after the while loop. Here, the last print statement is not a part of the loop,
and so it is executed after the loop gets over. The output of the program is given below.
Fig. 8.15
Example 6: Program to print natural numbers from 5 to 1 (using the while loop)
Fig. 8.16 Fig. 8.17
153
Fig. 8.18
Fig. 8.19
Fig. 8.20
Fig. 8.21
Example 9: Write a program to accept the salary and years of service of an employee. If the number of
years is more than 5, then display the new revised salary by increasing it by 10%.
154
Fig. 8.23
Example 10: Write a program to find the sum of the first 10 natural numbers.
Fig. 8.24
Fig. 8.25
Example 11: Write a program to accept a number N and display the Fibonacci series till N terms.
(A Fibonacci series is the one where the next term is calculated as the sum of its two previous terms,
assuming that the first two terms are 1, 1. For example, if N=5, then the output generated should be
01123…)
155
Fig. 8.27
Example 12: Write a program to accept a year from the user, and check whether it is a leap year or not.
Fig. 8.28 Fig. 8.29
Wordbank
156
• The print() function prints the given object to the standard output device (screen).
• Python supports different numerical data types, which are int, long, and float. It also supports
string, list, and tuple data types.
• Lists and tuples are used to store multiple values of different data types. The key difference
between these is that the values of a list are allowed to be modified while it is not allowed in a
tuple.
• The input() function is used to accept an input into a variable from a user.
• The conditional statements are used to take a decision based on the specified condition. The if,
if … else, and if … else … if are conditional statements.
• The for and while are the looping statements. These are used when we need to repeat a series of
instructions again and again.
• The break and continue statements are called the jump statements.
• The break statement is used to come out of the loop forcefully. The continue statement takes the
control of the loop (while or for) to the top by skipping rest of the statements inside the loop.
Solved Examples
1. What are variables? result with quotient as well as remainder,
Ans. Variables are the memory locations that are but the floor division operator gives only the
used to store data. The value stored in them is quotient as the result.
allowed to get varied, hence the name variable.
For example, the following code uses the
division and floor division operators.
2. In what format the data accepted using the
input command gets stored in a variable? a=7
Ans. The default format in which the data is stored
b=2
using the input command is string.
print (a/b)
3. What is a conditional statement?
print (a//b)
Ans. A conditional statement is the one that executes
a series of commands on the basis of the given Output of the above program is: 3.5 3
condition.
6. Is it possible to assign different values to
4. What are relational operators? Give examples. multiple variables in a single statement? If yes,
Ans. The relational operators are the operators that then give an example.
are used to compare values stored in variables. Ans. Yes, it is possible to assign different values to
For example, ‘>’ (greater than), ‘>=’ (greater multiple variables in a single statement.
than or equal to), ‘<’ (less than), and ‘<=’ (less For example, the following statement will
than or equal to) are some relational operators. assign three different values to three different
variables a, b, and c.
5. Differentiate between the division (/) and
floor division (//) operators with the help of an a, b, c = 12, 34, 12.4
example.
Ans. The division operator results in the accurate 7. What is the default value of the step keyword?
Ans. The default value of the step keyword is 1.
157
(e) print() (v) The data type for storing non-decimal integer values
(b) The ____________ and ____________ are (f) The ____________ statement skips the rest
the two types of loops used in Python. of the statements in a loop and transfers the
program control to the top.
(c) The ____________ keyword is used with the
for loop to specify the increment value.
(b) A comment is defined by the symbol (g) The statement ‘print(int(‘12’)+12)’ will
dollar ($). generate the result 24.
(c) The if statement is used to repeat over a set (h) If the program is not properly indented, it
of items. may result to a syntax error.
(d) The int() function can accept an integer as (i) The while loop is used to repeat a series of
well as float values. instructions as long as the specified condition
is True.
(e) The statements ‘print(“1”+“1”)’ and
‘print(‘1’+‘1’)’ will give the same output,
which is 11.
158
(c) What is a loop? (f) What are the two jumping statements?
159
160
161
Scratch is a visual programming language. It was developed by the Lifelong Kindergarten group at
the Massachusetts Institute of Technology. Using Scratch, we can create our own interactive stories,
games, and animations. We can work online as well as offline on Scratch.
Menu bar
The Menu bar is located at the top of the window. It shows the commands related to the projects you
create in Scratch.
Stage
It is the area where the execution of the code takes place. It is the background of a Scratch project. The
Scratch stage is 480 pixels wide and 360 pixels high.
Sprite
It is a small graphic element that can be moved around the screen. Its functions are controlled by
scripts. The default sprite is an orange cat. Scratch also has a library of inbuilt sprites. We can choose
any of the sprites from the library, or we can also draw our own sprite.
162
Menu bar
Blocks palette
Sprites pane
Fig. 9.1
Blocks palette
This section contains the elements used to program the sprite. The elements can be dragged from the
palette to the scripts area. There are ten different categories of blocks in the blocks palette.
Sprites pane
The sprites pane shows thumbnails of all the sprites added to the project. To select a sprite, click on
the sprite in the sprites list. The letter ‘i’ on the top left of a sprite can be clicked to view its info. It
also shows the coordinates of the sprite on a Cartesian plane.
Costumes tab
This tab lets you change the appearance of a sprite. It also allows you to change the size of the sprite
and the direction it faces.
Sounds tab
The Sounds tab lets you add sound to a sprite. Click the sprite and then click the Sounds tab. It
displays various options to add sound.
163
Block categories
The shapes we see on the Scratch interface to make a script or a program are called blocks. Depending
upon the nature of the program, these blocks are used. The different types of blocks are as follows.
Motion: The motion blocks are used to show the movement of a sprite.
Looks: These blocks are related to the appearance of the sprites.
Sound: These blocks have commands to play and control various sounds.
Pen: These blocks are related to the Scratch’s pen. These blocks help to turn the pen on and off and
adjust the various values of a pen.
Data: These blocks are used to store and access data. There are two sub-categories in this block—
Variables and Lists.
Events: These blocks are used to take a decision on the execution of the code when an event is
triggered. For example, what to do when the green flag is clicked or what should be executed when a
particular key from the keyboard is clicked.
Control: These blocks are used to control the execution of a script.
Sensing: These blocks allow us to enter input and detect actions. For example, these blocks can be
used to determine whether a sprite touches another sprite and the location of a mouse pointer.
Operators: These blocks contain the commands to perform mathematical calculations.
More: This category of block allows us to create our own blocks in Scratch.
TEMPO
The tempo block is basically the part of the Sound block, which is used to adjust the speed or tempo
of the sound to be played. Thus, it is used to increase or decrease the speed with which the music
should be played.
The lowest value of the tempo is 20 bpm and the highest value is 500 bpm. The term ‘bpm’ stands
for beats per minute, which is the unit for measuring the tempo of a sound. The higher the value of the
tempo, the faster the sound will play. The table given below describes the functions of the different
tempo blocks.
Blocks Functions
This block reports the value of the current
tempo.
This block is used to set the value of the
tempo in bpm.
This block is used to change the value of
the tempo by a specified value.
164
Fig. 9.2
Drag the blocks one after the other on the scripts area, and run the script to see the output.
VARIABLES
Variables are the memory locations that hold one value at a time, and this value can be changed
according to the requirement of the program. The variables are created under the Data block.
165
The table given below describes the Variable blocks with their functions.
Blocks Functions
This block reports the value of the variable created.
This block is used to hide the value of the variable from the stage.
Fig. 9.6
166
Fig. 9.7 Fig. 9.8
Note the variable ‘start’ appears at the top-left of the screen. The value of the variable will appear
changing when the script is run.
EVENTS BLOCKS
The Events blocks are brown-coloured blocks. These blocks trigger either a single script or multiple
scripts.
Blocks Functions
It runs the script when a key is pressed.
167
Blocks Functions
It compares two values. If the first value is less than the second
value, it returns True; otherwise, it returns false.
It compares two values. If the first value is greater than the second
value, it returns True; otherwise, it returns false.
It picks a random number between the first given number and the
second given number (the first and second number inclusive).
168
CONDITIONAL STATEMENTS
Sometimes, we need to do a task or generate a result based on some response or input from the
user—for example, making a sprite move forwards if the key ‘a’ is pressed and move backwards if the
key ‘b’ is pressed. This means that based on the given conditions, some task is to be performed. This
decision-making is possible in Scratch using the Control blocks. The table given below describes the
functions of some of the Control blocks.
Blocks Functions
169
Fig. 9.10
On clicking the green flag, the sprite will come to the centre of the stage. It will then glide to the
specified position for the specified amount of time. The if block will thereafter check if the sprite
touches the edge of the screen, and if this condition evaluates to True, the backdrop of the stage will
change.
170
To create a beautiful
pattern using iterations
171
Fig. 9.11
Sensing blocks
The Sensing blocks are used to detect some factors in a script. For example, these blocks can be used
to determine whether a sprite touches any colour or a mouse pointer and performs a task when a key
is pressed. The Sensing blocks are blue-coloured blocks.
Blocks Functions
172
Enter your
favourite novel.
Fig. 9.12 Fig. 9.13
In the above script, the input entered by the user cannot be used for
any purpose, and this input goes nowhere. So we need to store the
input using the block.
Fig. 9.14
Example 2: To accept a number and find out whether it is a positive
or negative number
Fig. 9.15
Output
Fig. 9.19
Output
Enter a number.
Fig. 9.20
87 is an odd
number.
Fig. 9.21
174
Fig. 9.22 Fig. 9.23
Step 4
The next step is to add a new sprite, ghost, from the library.
Step 5
Now add the code (shown in Fig 9.24) to the ghost sprite. This code will first tilt the ghost to 180
degrees as it will appear to be pouncing on the mouse, and then make it fall starting from the random
X-position and keep on decrementing the value of the Y-position by −5. As soon as the sprite reaches
the value of −180, which means the bottom of the stage, reset it to the top by setting the value of the
Y-position to 180 and again randomly get the value of the X-position.
Fig. 9.24
Step 6
Duplicate the ghost sprite two times so that the multiple ghosts appear to be falling. Change the initial
value of the X-position so that all the ghosts come from different positions.
175
Fig. 9.25 Fig. 9.26
176
Fig. 9.29
Fig. 9.30
Fig. 9.31
177
CREATING SONGS
We can create songs by using the blocks provided in the Sound block.
The code given alongside will play a tune.
Note: It requires a sound knowledge of notes and how they are played
on an instrument.
Fig. 9.38
Wordbank
178
• The Events block is used to take a decision on the execution of the code when an event is
triggered.
• The Sound block is used to adjust the speed or tempo of the sound to be played.
• The Data block is used to create variables in the scratch script.
• The Control block contains looping and conditional statement blocks which are used for
decision-making.
• In the if block, if the condition is True, the code inside the block gets executed.
• In the if-else block, if the condition is True, the code inside the if block gets executed.
Otherwise, the code inside the else block gets executed.
• The repeat block is used to repeat an action a specified number of times.
• The forever block repeats an action infinitely.
• The Sensing blocks are used when we need to ask for some input during the execution of a
program or for detecting certain factors, such as if a sprite is touching a specified colour.
• The ask and wait block is used to ask an input from a user. The answer block is used to store
the most recent input.
Solved Examples
1. 1. What is the file extension of a Scratch file? Ans. The commands to change the costumes of a
Ans. .sb2 sprite are found under the Looks block.
2. Which block is used for performing arithmetic 7. Look at the script given below. What should be
and comparison operations? done to repeat the given script 10 times?
Ans. Operators block
(a) (i) Repeats the blocks inside it until the condition is True
(a) The command is under (d) The ____________ block repeats an action
the ____________ block, where Count is the for a specified number of times.
name of the ____________ (e) The wait until block waits until the
(b) A general programming construct that condition is ____________ and then executes
allows a program to store a value is called a the code below it.
____________. (f) The ____________ blocks are used to carry
(c) The coordinates of the centre of the stage is out mathematical calculations.
____________. (g) Tempo is measured in terms of __________.
180
What will be the change in the execution of
the program if the repeat block is replaced
with the forever block?
l Lab Exercise
c 1. arrow
Write a code to make the sprite move left and right on the stage when the user presses the left and right
keys.
2. Accept a number in a variable and display the message ‘It is a greater number.’ if the number is greater
than 100, otherwise display ‘It is a smaller number.’
3. Create a Scratch script to show children participating in a race.
4. The following script creates a pattern as shown in the image given below. Create a similar pattern in
Scratch.
182
• Rahul wanted to find out the square root of a number accepted by the user. He
created the following script, but he did not get the correct answer. Can you help
s
him find the error in the code?
• Observe the code given below. What change should be done in the code to display the
next five numbers from the number entered by the user?
183
Solution:
<html>
<head>
<title> Operating system and its functions </title>
</head>
<body>
<h1> Operating System </h1>
<p>An operating system is a software program that controls the
operations of a computer and enables other programs to run on
it. It also provides the user with a medium, called interface,
to interact with the computer.</p>
<p>An operating system performs a number of functions. The
functions of operating system includes managing the interface,
input and output devices, processes, and computer memory.</p>
</body>
</html>
184
Solution:
<!DOCTYPE html>
<html>
<head>
<title> Operating system and its functions </title>
</head>
<style type=“text/css”>
body{background-color:lightgray; margin:50px}
h1{color:red; text-align:center; text-decoration:underline;
font-family:Calibri}
p{color:darkblue; font-size:large; font-family:Times New Roman}
</style>
<body>
<h1> Operating System</h1>
<p>An operating system is a software program that controls the
operations of a computer and enables other programs to run on
it. It also provides the user with a medium, called interface,
to interact with the computer.</p>
<p>An operating system performs a number of functions. The
functions of operating system includes managing the interface,
input and output devices, processes, and computer memory.</p>
</body>
</html>
185
Solution:
<!DOCTYPE html>
<html>
<head>
<title> Operating system and its functions </title>
</head>
<style type=“text/css”>
body{background-color:lightgray; margin:50px; color: darkblue;
font-size:large}
h1{color:red; text-decoration:underline; font-family:Calibri}
h3{color:green; text-decoration:underline; font-family:Calibri}
ul{font-family:Times New Roman; font-size:large}
p{font-family:Times New Roman}
</style>
<body>
<h1> Operating System</h1>
<p>An operating system is a software program that controls the
operations of a computer and enables other programs to run on
it. It also provides the user with a medium, called interface,
to interact with the computer.</p>
186
Example 4:
Make changes in Example 3, and add a related picture in the document.
Solution
<!DOCTYPE html>
<html>
<head>
<title> Operating system and its functions </title>
</head>
<style type=“text/css”>
187
188
Solution:
homepage.html
<!DOCTYPE html>
<html>
<head>
<title>E-learning wesbite</title>
<style type=“text/css”>
p{font-size:x-large; color:brown}
table{border-spacing: 6px 6px}
h1{color:navy; text-decoration: ; text-align:center}
h2{color:darkgreen}
td{border:5px solid blue; text-align:center; vertical-
align:middle; padding:0.1cm; font-size:x-large}
189
190
191
Example 6:
Write an HTML code to embed audio and video on a web page.
Solution:
<!DOCTYPE html>
<html>
<head>
<title> Inserting Audio and Video </title>
</head>
<style type=“text/css”>
h4{color:navy; text-shadow:0.5px 0.5px white; margin:20px}
</style>
<body>
<h4> Click on the play button to listen to the audio.</h4>
<audio src=“a1.mp3” controls=“controls”></audio>
192
Example 7:
Create and display the following table on a web page using HTML.
193
194
Example 8:
Create and display the following form in HTML.
195
196
Example 9:
Create a web page in HTML that has two vertical frames. In the first frame, display an image,
and in the second frame, show the related content.
Note:
A browser window can be divided into multiple sections. These sections are called frames, and
each section can hold a distinct HTML document.
The <iframe> tag is used to create an inline frame in a web page, which is a container
element. The attributes associated with this tag are listed in the table given below.
Attribute Description
src It defines the URL of the web page to be displayed in the frame.
Solution:
<!DOCTYPE html>
<html>
<head>
<title>Frames in HTML</title>
<style type=“text/css”>
body{backhround-color:lightgray}
h1{text-align:center; margin:30px}
</style>
</head>
<body>
<h1> Frames in HTML </h1>
197
198
Solution:
cls=input(“Enter your class:”)
s=input(“Enter your stream:”)
if cls==“11” or cls==“12”:
if s==“S” or s==“s”:
print (“Your allotted section is ‘A’.”)
elif s==“C” or s==“c”:
print (“Your allotted section is ‘B’.”)
elif s==“H” or s==“h”:
print (“Your allotted section is ‘C’.”)
else:
print(“You have entered a wrong stream.”)
else:
print(“You have entered a wrong class.”)
Output:
199
Solution:
N=int(input(“Enter a number:”))
i=1
while i<=10:
print(N+i)
i=i+1
Output:
Example 3:
Write a program to accept a number N and find its factorial.
Note: A factorial of a number is the product of all numbers from N till 1. For example, if N=6, then its
factorial is 6 × 5 × 4 × 3 × 2 × 1.
Solution:
N=int(input(“Enter a number:”))
counter=1
for k in range(1, N+1):
counter=counter*k
200
Example 4:
Write a program to accept a number N, and count the number of digits in it.
Solution
N=int(input(“Enter a number:”))
count=0
while N>0:
count=count+1
N=N//10
print(“The number of digits in the number are”, count, “.”)
Output:
Example 5:
Write a program to check if the number entered by the user is equal to zero, positive, or
negative.
Solution:
N=int(input(“Enter a number:”))
if (N == 0):
print(“The number is equal to zero.”)
elif (N > 0):
print(“It is a positive number.”)
201
Output:
Example 6:
Write a program to print all numbers in a range divisible by a given number.
Solution:
l=int(input(“Enter the lower range limit:”))
u=int(input(“Enter the upper range limit:”))
n=int(input(“Enter the divisor:”))
for i in range(l, u):
if(i%n==0):
print(i)
Output:
Example 7:
Write a program to input a number from the user, and check whether the number is a
palindrome or not.
(A palindrome number reads the same when written forwards or backwards. For example, 11 is a
palindrome number.)
202
Output:
Example 8:
Write a program to show the following menu:
1. Circle
2. Rectangle
3. Square
4. Exit
Accept the choice from the user as 1, 2, 3, 4 and accordingly accept the side of the figure.
Calculate the area and display the result. The program should continue till the user doesn’t
select option 4.
Solution:
ch=0
while ch!=4:
203
elif ch==2:
side1=float(input(“Enter length of a rectangle:”))
side2=float(input(“Enter breadth of a rectangle:”))
print(“Area is: “, side1*side2)
elif ch==3:
side3=float(input(“Enter side of a square:”))
print(“Area is: “,side3*side3)
elif ch==4:
print(“Exiting...”)
else:
print(“Wrong choice entered”)
Output:
204
Solution:
The script
The stage
Question 2:
Create a project in Scratch to accept a number from the user, and tell the sprite to count the
next ten consecutive numbers starting from the number entered by the user.
For example, if the number entered by the user is 6, then the counting done by the sprite
should be from 6 to 15.
205
The stage
Question 3:
Create a game in Scratch that counts the number of times a user touches or clicks on the
sprite, which is lost in space.
Solution:
The script
206
Question 4:
Create a pong ball game. Add a paddle to hit the ball and bounce it off. The paddle should
move left and right with the movement of the mouse. End the game when the paddle misses
to hit the ball three times.
Solution:
The script
Question 5:
Create a Scratch project to ask questions to a user. Increase the score by 1 for every correct
answer, and decrease by 1 for every incorrect answer. In the end, show the final score of the
user.
Solution:
The script
208
209
210
(a) (ii) (b) (vii) (c) (iv) (d) (i) (e) (vi)
(f) (ix) (g) (x) (h) (v) (i) (iii) (j) (viii)
(a) (ii) (b) (iii) (c) (ii) (d) (ii) (e) (iv)
(f) (iv) (g) (iii) (h) (iv) (i) (iii) (j) (iv)
(k) (iv) (l) (ii) (m) (ii) (n) (iv) (o) (iii)
(p) (ii) (q) (iv) (r) (ii)
Chapter 2
(a) (v) (b) (iv) (c) (i) (d) (ii) (e) (iii)
(f) True
(a) (iii) (b) (ii) (c) (ii) (d) (iii) (e ) (iii)
(f) (iii) (g) (iii) (h) (iii) (i) (iv)
211
(a) (vi) (b) (iii) (c) (i) (d) (ii) (e) (iv)
(f ) (v)
(a) (i) (b) (ii) (c) (ii) (d) (i) (e) (i)
(f) (iv)
Chapter 4
(a) (iv) (b) (iii) (c) (v) (d) (i) (e) (ii)
(a) (ii) (b) (ii) (c) (ii) (d) (ii) (e) (ii)
(f) (i) (g) (i) (h) (i)
Chapter 5
(a) (iv) (b) (iii) (c) (v) (d) (i) (e) (ii)
212
(a) <th> and <td> (b) left, center, and right (c) padding
(d) border (e) caption (f) colspan
(g) <ol> (h) <dl> (i) nested
(j) start (k) background-color
(a) False (b) False (c) False (d) True (e) False
(a) (iv) (b) (ii) (c) (iv) (d) (iii) (e) (i)
Chapter 6
(a) (ii) (b) (i) (c) (iv) (d) (v) (e) (iii)
(a ) True (b) True (c) False (d) False (e) False
(f ) False
(a) (i) (b) (iv) (c) (ii) (d) (iv) (e) (i)
Chapter 7
(a) (iii) (b) (ii) (c) (i) (d) (v) (e) (iv)
213
(a) False (b) True (c) True (d) True (e) True
(f ) False (g) True
(a) (ii) (b) (i) (c) (iv) (d) (iii) (e) (ii)
(f ) (ii)
Chapter 8
(a) (vi) (b) (i) (c) (v) (d) (iii) (e) (iv)
(f ) (ii)
(a) True (b) False (c) False (d) False (e) True
(f ) False (g) True (h) True (i) True
(a) (i) (b) (iii) (c) (ii) (d) (ii) (e) (ii)
(f) (iii) (g) (ii) (h) (i)
Chapter 9
(a) (vi) (b) (v) (c) (iv) (d) (ii) (e) (iii)
(f ) (i)
214
(a) True (b) True (c) True (d) True (e) False
(f ) False (g) True (h) False
(a) (i) (b) (i) (c) (iv) (d) (i) (e) (ii)
215
(a)
__________ is the method in which data is converted to an encoded form to protect it from an
unauthorized person.
(b) The __________ property is used to set the horizontal alignment of the text.
(c) The term ‘SFTP’ stands for __________.
(d) The __________ tag is used to give a caption to a table.
(e) The __________ protocol is used to receive emails from a server.
2.
State the following as true or false. [5]
(b) A patent is a right granted for the inventions and products that gives protection from selling or
importing the original work.
(d) A digital certificate has the digital signature of the issuing certificate authority.
(e) The font-size property is used to set the desired font size of the text.
(a) A set of four numbers from 0 to 255 separated by periods(.) forms the
(ii) protocol.
(iii) IP address.
(b) Which of the following non-profit corporations is formed to educate people about the benefits of
open-source software programs?
(i) GPL
(ii) FSF
(iii) OSI
(iv) IPR
216
(ii) <rem>
(iv) <comments>
(d) Which of the following tags marks the beginning of an ordered list?
(i) <ordered>
(ii) <ol>
(iii) <ul>
(iv) <li>
(e) Which of the following attributes is used to merge two or more rows into a single row?
(i) rowspan
(ii) colspan
(iii) rspan
(iv) cspan
4.
Answer the following questions.
(i) <td>
(ii) <img>
(b) Explain the term ‘digital divide’. [1]
(d) How can you insert an audio clip on a web page? Write the tags and the associated attributes. [3]
print(a + b, end=“@”)
print(b + c)
print(2**4,9**1, end=“Done”)
217
(c) Find the syntax errors in the following code, and rewrite the correct codes. [3]
d=a + b + c
print(“sum”: d)
If (c > b + a)
Else
(i) and
(ii) and
218
2. Write a Python program to accept the name of the employee, employee number, and basic pay.
Calculate the HRA, DA, and total pay (basic pay + HRA + DA) of the employee as per the
following criteria. [15]
219
(a) The __________ is a numerical address given to every computer connected to the internet for its
unique identification.
(b) The __________ tag is used in HTML for the largest heading level.
(c) The __________ attribute of the <td> tag specifies the number of rows a cell should span.
(d) The __________ attribute of the <img> tag is used to give an alternative text for the image to be
displayed.
2.
State the following as true or false. [5]
(a) A digital certificate is a type of electronic password that allows entities to exchange data over the
internet.
(b) Privacy or internet privacy refers to protecting sensitive data on the internet.
(d) A firewall is a network security system used to prevent unauthorized access to a private network
connected to the internet.
(e) The fourth generation (4G) of mobile technology offers higher rates of data transmission and is used
for watching high definition television content.
(b) Which of the following sets of tags is used to create a table in HTML?
220
(ii) The ‘Cc’ option contains the email addresses of the recipients who will receive the mail without
any of the other recipient knowing about it.
(iii) The username and domain name in an email address are separated by the ‘&’ symbol.
(d) In which of the following methods data is converted into an encoded form to protect it from an
unauthorized person?
(ii) Encryption
(iii) Decryption
(i) SFTP
(ii) SCP
(iii) SSH
(iv) HTTP
4.
Answer the following questions.
(b) Differentiate between the <img> and <a> tags in HTML. [2]
(c) How can you create a radio button? Write the syntax. [3]
(i) .gov
(ii) .org
(a) Name the function that is used to accept values into a variable. [1]
(b) Which loop is used to repeat a series of instructions as long as the condition is true? [1]
(c) Explain the for loop with the help of an example. [2]
221
if(x%2!=0):
continue
else:
print(x)
OR
(c) What are variables in Scratch? Under which block the variables are created? [2]
(i) and
(ii) and
222
List of Animals
(a) Mammals
1. Dogs
2. Cats
3. Horses
(b) Reptiles
1. Lizards
2. Snakes
3. Crocodiles
2. Create two linked web pages using HTML. Display information about books and their importance on
one page, and show a table showing different fiction and non-fiction books on the second page.
A sample table is shown below. [10]
Books Authors
Fiction books
Diary of wimpy kid Jeff Kinney
A wrinkle time Madeleine L’Engle
Non-fiction books
Hidden figures Margot Lee Shetterly
Little leaders: visionary women Vashti Harrison
around the world
3. Write a Python program to check the speed of the car driver. Take speed from the user, and display
the message according to the given conditions. [15]
OR
3. Write a Scratch script to ask five questions from the user. If the user gives the correct answer, increase the score
by 1, and if not, decrease the score by 1.
223
1965 The first network experiment conducted: This was the first
time when two computers communicated with each other using
the packet-switching technology.
224