1557119001-0llcomputer Applications CBSE 10th Answer

Download as pdf or txt
Download as pdf or txt
You are on page 1of 49

Computer Applications

Solution

X
Chapter 1
The Internet

A. A. 1. d 2. a 3. a 4. c 5. c 6. c 7. a 8. d 11. b 12. d
B. 1. servers 2. SSH 3. TELNET 4. website 5. four
6. FTP 7. web servers 8. web browser 9. IP Address 10. HTTPS
C. 1. F 2. F 3. T 4. T 5. F 6. T 7. F
D. 1. The hardware of the internet includes the cables that carry huge amount of data every second
to the computers in the network. Other hardware are routers, servers, cell phone towers,
satellites, radios, smart phones and other devices.
2. A protocol is a set of rules and guidelines for communicating data. The protocol used for
transferring files over the internet is FTP i.e. File Transfer Protocol.
3. The different ways to connect to the Internet are using:
• Dial-Up Connection
• Broadband Connection which includes- Cable Modem, Digital Subscriber Line and Satellite.
• Leased Lines
• Wireless Connection which includes – Wi-Fi, Wi-Fi Hotspots, WiMax and Internet Dongles.
4. The World Wide Web is based on these technologies:
• Web Servers and Web Browsers
• HTTP - Hypertext Transfer Protocol
• HTML - Hypertext Markup Language
5. A web page is a document that stores information, which can be viewed in the internet using a
web browser. A Website is a collection of related web pages stored in a web server.
6. A web browser is the software that facilitates the retrieval of information from a web server.
The information that is rendered by it may be text, images, videos or any other content and
sometimes third party plugins are used to display content inside web browsers. Some very
popular web browsers are Internet Explorer, Mozilla Firefox, Google Chrome and Opera.
Thus a web server and a web browser work in unison to achieve the satisfaction of the consumers.
7. The general form of a URL syntax is as follows:
Protocol://domain name/<directory path>/<object name>
For example:
http://www.cbse.nic.in/newsite/index.html
The elements of this syntax are as follows:

2 Computer Applications – X (CBSE Course) Answers


Protocol represents name of the protocol https, http, ftp which is used to transfer the data/web
page. A domain name is the component of a web address that identifies and locates an entity
(such as a person, business or organization) presence on the Internet. Technically speaking,
the domain name is the representation of the numeric IP Addresses assigned to individual
computers. In this case the domain name is www.cbse.nic.in.
Domain Name represents name of the website www.cbse.nic.in residing in the web server
where the website resides. Directory Path represents location i.e. the directories (or folders)
where the web page resides (in this case /newsite). Lastly the object name represents the name
of file you are accessing in this case index.html.
8. A domain extension or top-level domain (TLD) is the suffix at the end of a domain name,
such as .org, .com, .net. or .edu. If your domain name is www.cbse.nic.in, for example, your
domain extension is .nic.in which stands for National Informatics Centre and is typically used for
e-government web applications in India(.in). Most extensions represent a website category or a
country. For example the extension .in is used to represent a website registered in India.
9. i) TCP/IP, or the Transmission Control Protocol/Internet Protocol, is a suite of communication
protocols used to interconnect network devices on the internet.
ii) HTTP is a protocol used to transfer data over the World Wide Web.
iii) FTP is a protocol to download/upload s a file from a server using the Internet or to upload a
file to a server.
Application Oriented Questions
1. Protocol: File Transfer Protocol
Software: Cute FTP, Filezilla or SmartFTP.
2. Mr. Rupam could use an Internet Dongle or a Wi-Fi Dongle to access the Internet on the run.
3. The situation presents a situation such that terrestrial communications (using traditional telephony
grids) are not present or working optimally. Thus perhaps the best method of communication would
be to use VSAT (Very Small Aperture Terminal) for communication through satellite.

Computer Applications – X (CBSE Course) Answers  3


Chapter 2
Internet and Web
Services
A. 1. a 2. d 3. c 4. d 5. b 6. c 7. c 8. d 9. b 10. d
B. 1. search 2. e-group 3. Signup 4. Outbox 5. Carbon Copy
6. Wikipedia 7. Inbox 8. SMS 9. Chatting 10. Social Networking
C. 1. F 2. F 3. T 4. T 5. T 6. F 7. F 8. T 9. T 10. T
D. 1. Wikipedia is an online free encyclopedia that allows people to show, add or edit information.
2. A search engine is a software that looks for and distinguishes things in a database that compare
to essential words or characters tagged by the users, utilized particularly for discovering specific
destinations on the World Wide Web. Example Google and Bing.
3. i) Type “Weather” followed by the city name in the Google search field whose weather
condition you want to see for the past one week.
ii) Type in any mathematical expression in the search field of Google, which in turn will start
the Google Calculator.
iii) Type in “define” followed by the term whose definition, which you need to find.
iv) Specify from any unit to any unit conversion. Try it out: 3km to inches
4. A web crawler is a program that visits Web sites and reads their pages and other information in
order to create entries for a search engine index.
5. WhatsApp Messenger is a freeware and cross-platform messaging and Voice over IP service
owned by Facebook. The application allows the sending of text messages and voice calls, as well
as video calls, images and other media, documents, and user location.
6. To search for an individual you may use the following techniques:
a) Type in the name of the person in Google Search.
b) Go for a blog search in http://www.google.com/blogsearch
c) Search for the name in Social Networking Websites.
d) You may use an online “people” search engine/finder.
e) Try Myspace.com and BuddyFetch.com.
7. A disposable email address may be used in case you do not want to part with your email address.
8. A Captcha is a computer program or system intended to distinguish human from machine input,
typically as a way of thwarting spam and automated extraction of data from websites.
9. Attachment is a term used in Email to send a file along with the email message.

4 Computer Applications – X (CBSE Course) Answers


10. Cc stands for carbon copy which means that whose address appears after the Cc: header would
receive a copy of the message. Also, the Cc header would also appear inside the header of the
received message.
Bcc stands for blind carbon copy which is similar to that of Cc except that the Email address
of the recipients specified in this field do not appear in the received message header and the
recipients in the To or Cc fields will not know that a copy sent to these address.
Electronic governance or e-governance is the application of information and communication
11.
technology (ICT) for delivering government services, exchange of information, communication
transactions, integration of various stand-alone systems and services between government-to-
citizen (G2C), government-to-business (G2B), government-to-government (G2G), government-
to-employees (G2E) as well as back-office processes and interactions within the entire
government framework.
Advantages:
• E-governance offer an increased portfolio of public services to citizens in an efficient and cost
effective manner.
• It allows for government transparency and accountability because it allows the public to be
informed about what the government is working on as well as the policies they are trying to
implement.
• It improves the efficiency of the current system( Paper based system). That would in return
same money and time.
12. An e-group can be defined as a group of persons or individuals who come together online for a
specific or common purpose.
13. Difference between 3G and 4G:

Basis for Comparison 3G Technology 4G Technology

Data Bandwidth 2 Mbps - 21 Mbps 2 Mbps - 1 Gbps

Peak Upload Rate 5 Mbps 500 Mbps

Peak Download Rate 21 Mbps 1 Gbps


Switching Technique Packet Switching Packet Switching,
Message Switching
Standards IMT 2000 Single Unified standard
3.5G HSDPA Wimax and LTE
3.75G HSUPA

Advantages of e-shopping
14.
• Reduces Cost: Since the retailer do not require a showroom, involving huge cost can pass
on the benefit to the consumer by selling a product at a price lesser than the market rate.

Computer Applications – X (CBSE Course) Answers  5


• Increased Sales: Since it do not require marketting staff to showcase the product or
convince the consumer, such sites can virtually handle millions of transaction at a
particular instance.
Disadvantage of e-shopping
• You need to be very careful when shopping online. Before purchasing a product from such
sites you need to check for its authenticity. There are few fraudulent site which may get
easy access to your user id and password of your net banking account or debit card or credit
card.
• There may be hackers who might hack into your account and misuse it.
15. The fundamental difference between RTGS and NEFT, is that while RTGS is based on gross
settlement, NEFT is based on net-settlement. Gross settlement is where a transaction is
completed on a one-to-one basis without bunching with other transactions. On the other hand
a Deferred Net Basis (DNS), or net-settlement means that the transactions are completed in
batches at specific times. Here, all transfers will be held up until a specific time.
Application Oriented Questions
1. i. Mr. Shravan can run a Blog that is given as a free service over the Internet.
ii. Eblogger and Wordpress
2. i. Real Time Tools like Facebook, Twitter, etc. may be used for posting messages, chatting and
video conferencing.
ii. Social Networking Sites.
3. i. E-reservation
ii. E-Reservation websites allows users to reserve railway ticket book, airline booking, hotel or
resort booking etc.
4. i. NEFT, RTGS or IMPS
ii. Disadvantages
• E-Banking is generally secure, but it certainly isn’t always secure. Identity theft is running
uncontrolled, and banks are in no way, shape or form resistant. And once your information
is compromised, it can take months or even years to correct the damage.
• Before using a banking site that you aren’t familiar with, check to make sure that they are
affiliated to Reserve Bank of India (RBI).

6 Computer Applications – X (CBSE Course) Answers


Chapter 3
HTML (Hyper Text
Markup Language)
A. 1. a 2. d 3. a 4. d 5. b 6. a 7. c 8. a 9. c 10. d
B. 1. Empty 2. Tags 3. <B> 4. <HTML>,</HTML> 5. Comments
6. BGCOLOR 7. BACKGROUND 8. TEXT 9. NOSHADE 10. WHITE
C. 1. F 2. T 3. F 4. T 5. F 6. F 7. F 8. T 9. F 10. F
D. 1. HTML stands for Hyper Text Markup Language. It is the basic language through which websites
are built.
2. HyperText is the method by which you move around on the web — by clicking on special text
called hyperlinks will bring you to the next page.
3. HTML codes may be written in simple text editors like Notepad and should be saved using the
extension .html or .htm.
To execute a HTML file simply double click on it to execute it in the default browser.
4. Tags in HTML are used to separate out normal text from HTML code, which are enclosed within
<angle-brackets>. This tags are used as HTML commands which makes the web browser perform
the given task.
They are classified as container tags and empty tags.
5. Rules for coding in HTML:
i. Every HTML tag should be surrounded by angular brackets < and >.
ii. The words/letters between these two angular brackets are called elements. These are the
coded commands within HTML. Elements tell the browser how to display the web page.
iii. HTML is also not case sensitive. That means, you can use either lowercase or uppercase
characters.
6. An HTML tags can also have attributes that provides additional information about an
element. For example, the BODY tag may have the BGCOLOR attribute:
<BODY BGCOLOR=“green”>

</BODY>
7. The <HEAD> tag is used to provide header details i.e. it contains general information like
the title of your document. The <BODY> tag on the other hand holds all your content: words,
pictures, artwork and other stuff.

Computer Applications – X (CBSE Course) Answers  7


8. HTML files have .html or .htm extensions. You may use either of these methods to open a HTML
document in a web browser:
• Open Windows Explorer and now navigate your computer and click on the HTML document
you want to execute. Right click on it and from the popup menu that appears click “Open
With” and select your web browser.
• You may open any web browser and use the keyboard combination Ctrl+O to start the Open
dialog and select the relevant document.
9. Comments in HTML is used as a documentation for understanding the HTML code. It helps
programmers to understand the program. Comments in HTML always begin with <!-- and end
with --!>. The browser ignores any text placed inside the comment.
10. The 2 attributes of the <HR> tag are:
SIZE: The SIZE attribute of the horizontal tag is used to specify the height of a horizontal rule in
pixels.
WIDTH: The WIDTH attribute of the horizontal tag is used to specify the width of the horizontal
rule in pixel or percentage.
Application Oriented Questions
1. a. i. To write the HTML code Notepad may be used.
ii. To get the output of the HTML code a browser like Internet Explorer, Google Chrome,
Mozilla Firefox may be used.
b. The extension may be either .html or .htm.
c. Open File Explorer and now navigate your computer and click on the HTML document you
want to execute. Right click on it and from the popup menu that appears click “Open With”
and select your web browser.
2. a. This text is normal <B> whereas this is in bold</B>.
b. <I>This is in italics</I> <U>whereas this is underlined.</U>
c. <B><U>This text is underlined as well as bold.</U></B>
d. <U>This text is underlined.</U><BR>
<B>But this text is in bold.</B>
3. a. <BODY BGCOLOR =“BLUE” TEXT=“RED” >
b. <BODY BACKGROUND=“ butterfly.jpg”>
c. <!—My first HTML page -->
d. <TITLE> Programming in HTML </TITLE>
e. <BODY RIGHTMARGIN=“80”>

8 Computer Applications – X (CBSE Course) Answers


Chapter 4
More on HTML – I

A. 1. d 2. a 3. b 4. d 5. b 6. a 7. b 8. a 9. a 10. c
B. 1. <UL> 2. circle 3. <LI> 4. Definition 5. nested
6. <SUP> 7. TYPE 8. JPG 9. HREF 10. <SUB>
C. 1. F 2. T 3. T 4. T 5. F 6. F 7. F 8. F 9. T 10. T
D. 1. Lists in HTML is used to arrange data containing bullets and numbering to produce an ordered
set of text. The different categories of list that can be created using HTML are:
a) Ordered List
b) Un-Ordered List
c) Definition List
2. Unordered Lists are used to display with bullets before each item in the list. Ordered Lists also
called Numbered Lists are used to specify numbers instead of bullets as in Unordered lists.
3. The TYPE attribute of the UL tag is used to define the symbol for the bullets which may be disc,
circle or square.
4. Ordered Lists also called Numbered Lists are used to specify numbers instead of bullets as in
Unordered lists.
<OL TYPE=“a” START=“5”>
5. A definition list is a list of terms and corresponding definitions. Definition lists are typically
formatted with the term on the left with the definition following on the right or on the next line.
The definition text is typically indented with respect to the term.
A definition list always begins with the <DL> tag and ends with the </DL> tag. The definition term
is tagged as <DT> and a definition description tagged as <DD>.
6. A list within a list is called a nested list.
Example,
<UL>
<LI> West Bengal
<UL TYPE=”square”>
<LI> Darjeeling
<LI> Bankura

Computer Applications – X (CBSE Course) Answers  9


<LI> Jalpaiguri
<LI> Islampur
</UL>
<LI> Bihar
<UL TYPE=”square”>
<LI> Kishanganj
<LI> Purnea
<LI> Madhepura
<LI> Katihar
</UL>
</UL>
Application based Questions
<HTML>
<HEAD>
<TITLE>Indian Mangoes</TITLE>
<BASEFONT FACE=“Arial”>
</HEAD>
<BODY>
<H1 ALIGN=”CENTER”> <FONT COLOR=”BLUE”>MANGOES IN INDIA </FONT></H1>
<P ALIGN=”JUSTIFY”>
Mangoes of India are well famous in the world for its sweetness, richness and flavor, the land of India is
the largest producer of mangoes and most important fruit of the country.
</P>
<IMG SRG=”mangoes.png”><BR>
Most popular types of mangoes in India are:<BR>
<UL TYPE=”SQUARE”>
<LI>Alphonsos
<LI>Badami
<LI>Chausa
<LI>Dasheri
</UL>
10 Computer Applications – X (CBSE Course) Answers
<BR>
Some other famous varieties of mango includes:<BR>
<UL TYPE=”SQUARE”>
<LI>Bombay Green
<LI>Amrapali
<LI>Kishenbhog
<LI>Mankurad,Pairi
<LI>Fazli.
</UL>
</BODY>
</HTML>
Lab Exercise
1. <HTML>
<HEAD>
<TITLE>Lab Exercise</TITLE>
</HEAD>
<BODY>
Places in Orissa:<BR>
<UL>
<LI> Puri
<LI> Konark
<LI> Bhubaneshwar
<LI> Cuttack
<LI> Chilka Lake
<LI> Gopalpur
</UL>
<BR>
Places in Maharashtra:<BR>
<UL>
<LI>Mumbai

Computer Applications – X (CBSE Course) Answers  11


<LI>Pune
<LI>Lonavla
<LI>Shirdi
<LI>Mahabaleshwar
<LI>Nashik
</UL>
</BODY>
</HTML>
2. <HTML>
<HEAD>
<TITLE>Lab Exercise</TITLE>
</HEAD>
<BODY>
Single Digit Prime Numbers:<BR>
<OL>
<LI> Two
<LI> Three
<LI> Five
<LI> Seven
</OL>
<BR>
Two Digit Prime Numbers:<BR>
<OL START=”5”>
<LI>Eleven
<LI>Thirteen
<LI>Seventeen
<LI>Nineteen
</OL>
</BODY>
</HTML>
3. <HTML>

12 Computer Applications – X (CBSE Course) Answers


<HEAD>
<TITLE>Lab Exercise</TITLE>
</HEAD>
<BODY>
Library<BR>
<UL>
<LI> Science
<UL TYPE=”circle”>
<LI> Physics
<LI> Chemistry
<LI> Biology
</UL>
<LI>Commerce
<UL TYPE=”circle”>
<LI> Accountancy
<LI> Business Studies
<LI> Commercial Mathematics
</UL>
<LI>Humanities
<UL TYPE=”circle”>
<LI> History
<LI> Geography
<LI> Language
</UL>
</UL>
</BODY>
</HTML>
4. <HTML>
<HEAD>
<TITLE>Lab Exercise</TITLE>
</HEAD>

Computer Applications – X (CBSE Course) Answers  13


<BODY>
<OL REVERSED>
<LI>RED
<LI>ORANGE
<LI>YELLOW
<LI>GREEN
<LI>BLUE
<LI> INDIGO
<LI> VIOLET
</OL>
</BODY>
</HTML>

14 Computer Applications – X (CBSE Course) Answers


Chapter 5
More on HTML – II

A. 1. b 2. b 3. b 4. a 5. a 6. c 7. c 8. a 9. d 10. b
B. 1. <TR> 2. CAPTION 3. BORDER 4. text 5. #
6. CELLPADDING 7. ALT 8. TARGET 9. ALIGN 10. CELLSPACING
C. 1. F 2. T 3. F 4. F 5. F 6. T 7. F 8. T 9. T 10. T
D. 1. Tables are used in HTML to display tabular data in the form of rows and columns.
<TABLE BORDER=4 BORDERCOLOR=RED BGCOLOR=GREEN>
2. <TD>…</TD> tag to define a data cell. <TR>…</TR> tag on the other hand is used to define a
table row.
3. <CAPTION>…</CAPTION> tag to define a title or caption for the table.
4. This is to state that the table should be drawn with a border thickness of 4 pixels, having colour
of the border as red, with the width and height of the table as 600 and 200 respectively.
5. <TABLE>
<CAPTION>Colours</CAPTION>
<TH>RED</TH>
<TH>GREEN</TH>
<TH>BLUE</TH>
<TH>ORANGE</TH>
<TH>CYAN</TH>
<TR>
<TD BGCOLOR=”RED” WIDTH=”100” HEIGHT=”50”></TD>
<TD BGCOLOR=”GREEN” WIDTH=”100” HEIGHT=”50”></TD>
<TD BGCOLOR=”BLUE” WIDTH=”100” HEIGHT=”50”></TD>
<TD BGCOLOR=”ORANGE” WIDTH=”100” HEIGHT=”50”></TD>
<TD BGCOLOR=”CYAN” WIDTH=”100” HEIGHT=”50”></TD>
</TR>
</TABLE>

Computer Applications – X (CBSE Course) Answers  15


6. The BORDER attribute is used to provide a table border. The general syntax of the BORDER
attribute is written as
BORDER=size
The size is given in pixels to specify the thickness of the border of a table.
7. The BORDERCOLOR attribute is used to specify the color for the border of a table. The BGCOLOR
is used to provide a background color to a table.
8. The ALIGN attribute of the table tag is used to specify the alignment of the table itself. The
ALIGN attribute of the <TR> tag aligns the content of the row of the table.
9. For Example, <A HREF =another.html> will lead you to another html page in the same folder </
A> when clicked.
10. The CELLSPACING attribute of the TABLE tag is used to specify the distance between the cell
content and cell boundary. The CELLPADDING attribute of the TABLE tag is used to specify the
distance between the adjacent cells in a table.
Application based Questions
<HTML>
<HEAD>
<TITLE>Global Warming</TITLE>
<BASEFONT FACE=“Arial”>
</HEAD>
<BODY LINK=”GREEN”>
<H1 ALIGN=”CENTER”><FONT COLOR=”BLUE”>Global
Warming</FONT></H1>
<P ALIGN=”JUSTIFY”>
Global warming is the observed century-scale rise in the average temperature
of Earth’s climate system.
</P>
<P ALIGN=”JUSTIFY”>
Since the early 20th century, the global air and sea surface temperature has increased about 0.8 &deg
C (1.4 &deg F), with about two-third of the increase occurring since 1980. Initial cause of temperature
changes:
</P>
<IMG SRC=”warming.png” ALT=”beautiful rose”” STYLE=”FLOAT:RIGHT;”>
<UL TYPE=”SQUARE”>

16 Computer Applications – X (CBSE Course) Answers


<LI><A HREF=”one.html”>Greenhouse gases</A>
<LI><A HREF=”two.html”>Particulates and soot</A>
<LI><A HREF=”three.html”>Solar Activity</A>
</UL>
<TABLE BORDER=”2”>
<CAPTION>Observed and expected environmental effects</CAPTION>
<TR>
<TD>Natural systems</TD>
<TD>Ecological systems</TD>
<TD>Long-term effects</TD>
<TD>Large-scale and abrupt impacts</TD>
</TR>
</TABLE>
<a href=“mailto:abc@xyz.com”>For more details</a>
</BODY>
</HTML>
Lab Exercise
1. <HTML>
<HEAD>
<TITLE>Lab Exercise</TITLE>
</HEAD>
<BODY>
<TABLE BORDER=”2”>
<TR BGCOLOR=”ORANGE” ALIGN=”CENTER”>
<TD>Periods-></TD>
<TD>1</TD>
<TD>2</TD>
<TD>3</TD>
<TD>4</TD>
<TD>5</TD>

Computer Applications – X (CBSE Course) Answers  17


<TD>6</TD>
</TR>
<TR ALIGN=”CENTER”>
<TD BGCOLOR=”ORANGE”> Monday </TD>
<TD> English </TD>
<TD> Maths</TD>
<TD> Vernacular</TD>
<TD> S.St.</TD>
<TD> Science</TD>
<TD> Games</TD>
</TR>
<TR ALIGN=”CENTER”>
<TD BGCOLOR=”ORANGE”> Tuesday </TD>
<TD> English </TD>
<TD> Maths </TD>
<TD> S.St. </TD>
<TD> Vernacular </TD>
<TD> E.V.S. </TD>
<TD> Games</TD>
</TR>
<TR ALIGN=”CENTER”>
<TD BGCOLOR=”ORANGE”> Wednesday </TD>
<TD> English </TD>
<TD> Maths </TD>
<TD> Science </TD>
<TD> E.V.S. </TD>
<TD> S.St. </TD>
<TD> Games</TD>
</TR>
<TR ALIGN=”CENTER”>

18 Computer Applications – X (CBSE Course) Answers


<TD BGCOLOR=”ORANGE”> Thursday </TD>
<TD> English </TD>
<TD> Science </TD>
<TD> Maths </TD>
<TD> Vernacular </TD>
<TD> G.K. </TD>
<TD> Games</TD>
</TR>
<TR ALIGN=”CENTER”>
<TD BGCOLOR=”ORANGE”> Friday </TD>
<TD> English </TD>
<TD> Science </TD>
<TD> S.St. </TD>
<TD> Maths </TD>
<TD> E.V.S. </TD>
<TD> Activity</TD>
</TR>
</TABLE>
</BODY>
</HTML>
2. <HTML>
<HEAD>
<TITLE>Lab Exercise</TITLE>
</HEAD>
<BODY>
<TABLE BORDER=”2”>
<TR BGCOLOR=”ORANGE” ALIGN=”CENTER”>
<TD COLSPAN=”2”>Production</TD>
<TD COLSPAN=”2”>Sales</TD>
</TR>

Computer Applications – X (CBSE Course) Answers  19


<TR ALIGN=”CENTER”>
<TD>Raha Mutisya</TD>
<TD>1493</TD>
<TD>Claire Home</TD>
<TD>4827</TD>
</TR>
<TR ALIGN=”CENTER”>
<TD>Shalom Buraka</TD>
<TD>3829</TD>
<TD>Bruce Eckel</TD>
<TD>4246</TD>
</TR>
<TR ALIGN=”CENTER”>
<TD>Brandy Davis</TD>
<TD>0283</TD>
<TD>Danny Zeman</TD>
<TD>5689</TD>
</TR>
</TABLE>
</BODY>
</HTML>
3. <HTML>
<HEAD>
<TITLE>Lab Exercise</TITLE>
</HEAD>
<BODY>
<TABLE BORDER=”2”>
<TR ALIGN=”CENTER”>
<TD ROWSPAN=”3” BGCOLOR=”ORANGE”>Production</TD>
<TD>Raha Mutisya</TD>

20 Computer Applications – X (CBSE Course) Answers


<TD>1493</TD>
<TD ROWSPAN=”3” BGCOLOR=”ORANGE”>Sales</TD>
<TD>Claire Home</TD>
<TD>4827</TD>
</TR>
<TR ALIGN=”CENTER”>
<TD>Shalom Buraka</TD>
<TD>3829</TD>
<TD>Bruce Eckel</TD>
<TD>4246</TD>
</TR>
<TR ALIGN=”CENTER”>
<TD>Brandy Davis</TD>
<TD>0283</TD>
<TD>Danny Zeman</TD>
<TD>5689</TD>
</TR>
</TABLE>
</BODY>
</HTML>
4. a. <HTML>
<HEAD>
<TITLE>Lab Exercise</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=”CENTER”>MY SCHOOL</H1>
LINE 1<BR>
LINE 2<BR>
LINE 3<BR>
LINE 4<BR>

Computer Applications – X (CBSE Course) Answers  21


LINE 5<BR>
</BODY>
</HTML>
b. <HTML>
<HEAD>
<TITLE>Lab Exercise</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=”CENTER”>MY FAVOURITE SPORT</H1>
LINE 1<BR>
LINE 2<BR>
LINE 3<BR>
LINE 4<BR>
LINE 5<BR>
</BODY>
</HTML>
c. <HTML>
<HEAD>
<TITLE>Lab Exercise</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=”CENTER”>About Myself</H1>
<IMG SRC=”myself.jpg” ALT=”Myself” ALIGN=”right”>
<UL>
<LI><A HREF=”school.html”>My School</A>
<LI><A HREF=”sports.html”>My Favourite Sports</A>
</UL>
</BODY>
</HTML>

22 Computer Applications – X (CBSE Course) Answers


Chapter 6
Advanced HTML

A. 1. d 2. a 3. a 4. a 5. b 6. c 7. d 8. a 9. d 10. a
B. 1. Submit 2. form-handler
3. TEXTAREA 4. <SELECT>
5. Radio 6. Checkbox
7. Face 8. Frames
9. FRAMEBORDER 10. MARGINWIDTH
C. 1. T 2. T 3. F 4. T 5. F 6. F 7. T 8. T 9. T 10. F
D. 1. <HTML>
<HEAD>
<TITLE>Lab Exercises</TITLE>
</HEAD>
<BODY>
<form>
Select Games:<br>
<input type=”checkbox” name=”games1” value=”Football”> Football<br>
<input type=”checkbox” name=”games2” value=”Cricket”>Cricket<br>
<input type=”checkbox” name=”games3” value=”Badminton”>Badminton<br>
<input type=”checkbox” name=”games4” value=”Basketball”>Basketball<br>
</form>
</BODY>
</HTML>
2. <HTML>
<HEAD>
<TITLE>Lab Exercises</TITLE>
</HEAD>
<BODY>

Computer Applications – X (CBSE Course) Answers  23


<form>
Select Stream:<br>
<input type=”radio” name=”stream” value=”Science” checked> Science<br>
<input type=”radio” name=”stream” value=”Humanities”>Humanities<br>
<input type=”radio” name=”stream” value=”Commerce”>Commerce<br>
<input type=”radio” name=”stream” value=”Humanities”>Fine Arts<br>
</form>
</BODY>
</HTML>
3. It is used to provide the items for the drop down list in a form.
4. In a checkbox group, a user can select more than one option. Each checkbox operates individually,
so a user can toggle each response “on” and “off.” Radio buttons, however, operate as a group
and provide mutually exclusive selection values.
5. The major difference between a textarea and a text field, is that a text field only has one line,
whereas a textarea usually has multiple lines.
6. The submit button is used whenever you want to submit a form. The reset button is used to clear
all inputs given by the user and set the default value.
7. This is necessary to group a list of items in a radio button to make it mutually exclusive.
8. The main advantage of frames is that it allows the user to view multiple documents within a
single Web page. It is possible to load pages from different servers in a single frameset.
9. The audio and video tag is used to embed audio and video files into a HTML document.
10. MIME type stands for Multipurpose Internet Mail Extensions and is a format for a video file that
is transmitted across the internet. MIME types were originally created so that emails could send
more than just text. Today, a MIME type is not just for email, but are used by web browsers and
web servers to understand what kind of files are being sent to them.
Lab Exercise
1. <HTML>
<HEAD>
<TITLE>Forms</TITLE>
</HEAD>
<body>
<form action=”mailto:someone@example.com” method=”post”>
<table border=”0”>

24 Computer Applications – X (CBSE Course) Answers


<tr><td>Name:</td><td><input type=”text” name=”NAME” value=”” size=”30”></td></tr>
<tr><td>Password:</td><td><input type=”password” name=”pwd” value=”” size=”30”></td></tr>
<tr><td>Email:</td><td><input type=”email” name=”email” value=”” size=”30”></td></tr>
<tr><td>State:</td><td><input type=”text” name=”STATE” value=”” size=”10”></td></tr>
<tr><td>Zip:</td><td><input type=”text” name=”ZIP” value=”” size=”10”></td></tr>
<tr>
<td>Country:</td>
<td>
<SELECT NAME=”COUNTRIES”>
<OPTION VALUE=”india”>INDIA</OPTION>
<OPTION VALUE=”bhutan”>BHUTAN</OPTION>
<OPTION VALUE=”bangladesh”>BANGLADESH</OPTION>
<OPTION VALUE=”nepal”>NEPAL</OPTION>
</SELECT>
</td>
</tr>
<tr>
<td>Subscription:</td>
<td>
<input type=”radio” name=”SUBSCRIPTION” value=”1yr” checked>1 year
&nbsp;&nbsp;&nbsp;
<input type=”radio” name=”SUBSCRIPTION” value=”2yrs”>2 years
</td>
</tr>
<tr>
Select your hobby:<br>
<input type=”checkbox” name=”hobby1” value=” Philately “>Philately<br>
<input type=”checkbox” name=”hobby2” value=” Cooking “>Cooking<br>
<input type=”checkbox” name=”hobby3” value=” Gardening “>Gardening<br>
<input type=”checkbox” name=”hobby4” value=” Photography “>Photography<br>

Computer Applications – X (CBSE Course) Answers  25


</tr>
<tr><td colspan=”2”><input type=”submit” value=”Send Your Order”></td></tr>
</table>
</form>
</body>
</HTML>
2. <HTML>
<HEAD>
<TITLE>Forms</TITLE>
</HEAD>
<body>
<h1 align=”center”>Registration Form</h1>
<form action=”mailto:someone@example.com” method=”post”>
Username:<input type=”text” name=”NAME” value=”” size=”30”><br>
Password:<td><input type=”password” name=”pwd” value=”” size=”30”><br>
Confirm Password:<input type=”password” name=”cpwd” value=”” size=”30”><br>
First Name:<input type=”text” name=”FNAME” value=”” size=”30”><br>
Last Name:<input type=”text” name=”LNAME” value=”” size=”30”><br>
Email:</td><td><input type=”email” name=”email” value=”” size=”30”></br>
Phone No:<input type=”text” name=”phno” value=”” size=”30”><br>
Location:<input type=”text” name=”loc” value=”” size=”30”><br>
<input type=”submit” value=”Submit”>
<input type=”reset” value=”Reset”>
</form>
</body>
</HTML>
3. <HTML>
<HEAD>
<TITLE>Frames example</TITLE>
</HEAD>

26 Computer Applications – X (CBSE Course) Answers


<FRAMESET ROWS=”20%,80%” BORDER=7>
<FRAME SRC=”page1.html” >
<FRAMESET COLS=”50%,50%”>
<FRAME SRC=”page2.html”>
<FRAME SRC=”page3.html”>
</FRAMESET>
</FRAMESET>
</HTML>
4. <HTML>
<HEAD>
<TITLE>Frames example</TITLE>
</HEAD>
<FRAMESET COLS=”50%,25%,25%” BORDER=7>
<FRAMESET ROWS=”50%,50%”>
<FRAME SRC=”ORANGE.html”>
<FRAME SRC=”BLUE.html”>
</FRAMESET>
<FRAME SRC=”RED.html” >
<FRAME SRC=”GREEN.html” >
</FRAMESET>
</HTML>

Computer Applications – X (CBSE Course) Answers  27


Chapter 7
Cascading Style Sheets
(CSS)
A. 1. D 2. D 3. A 4. A 5. C 6. A 7. C 8. C 9. D 10. A
B. 1. font-family 2. font-style 3. text-align 4. float
5. outline-offset 6. outline-style 7. auto; 8. margin
9. border-style 10. background-color
C. 1. F 2. T 3. F 4. T 5. F 6. F 7. T 8. F 9. F 10. T
D. 1. Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to simplify
the process of making web pages presentable.
2. CSS comes in three types:
• In a separate file (external)
• At the top of a web page document (internal)
• Right next to the text it decorates (inline)
3. A CSS rule-set consists of a selector and a declaration block:


The selector points to the HTML element you want to style.
The declaration block contains one or more declarations separated by semicolons.
Each declaration includes a CSS property name and a value, separated by a colon.
4. Internal or Embedded styles are placed at the top of each web page document, before any of
the content is listed.
5. The HREF attribute of the LINK tag is used to specify the path of the CSS external file. The REL
stands for “relationship”, where the value denotes how the item being linked to is related to the
containing document.
6. The Descendant Selectors are used in case you want to apply a style rule to a particular element
only when it lies inside a particular element. As given in the following example, style rule will
apply to <em> element only when it lies inside <ul> tag.
ul em {
color: green;
}
28 Computer Applications – X (CBSE Course) Answers
7. Grouping Selectors are used to apply a style to many selectors. This is done by separating the
selectors with a comma, as given in the following example −
h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}
This define style rule will be applicable to h1, h2 and h3 element as well. The order of the list is
irrelevant. All the elements in the selector will have the corresponding declarations applied to
them.
8. The 3 values are:

Dotted Specifies a dotted border


Dashed Specifies a dashed border
Solid Specifies a solid border
9. To specify the margins of each of the individual sides the following properties are used:
• margin-top
• margin-right
• margin-bottom
• margin-left
10. a. The 4 values represents top margin, right margin, bottom margin and left margin respectively.
b. The 2 values represents top, bottom and left, right margins.
11. The possible values are:

Value Description

auto The browser calculates the height or width. This is default.

length Defines the height or width in px, cm, etc.

% Defines the height or width in percent of the containing block.

initial Sets this property to its default value.

inherit Inherits this property from its parent element.

Computer Applications – X (CBSE Course) Answers  29


12. The outline-width property specifies the width of the outline, and can have one of the following
values:
• thin (typically 1px)
• medium (typically 3px)
• thick (typically 5px)
• A specific size (in px, pt, cm, em, etc)
The following CSS example shows the effect of outline-width property:
p{
border: 1px solid black;
outline-style: solid;
outline-color: red;
outline-width: thin;
}
Lab Exercise
1. <html>
<head>
<title>Fonts</title>
<link rel=”stylesheet” href=”question4.css”/>
</head>
<body>
<h1>Lab Exercise 3: HTML and CSS</h1>
<hr>
<b>Name:</b>Ezmir b. Mohd Razali<br>
<b>ID:</b>12345678<br>
<b>Date of submission:</b>28.6.2004<br>
<br><br>
<ul>
<li>Question 2
- <li>Question 3
</ul>
</body>
</html>

30 Computer Applications – X (CBSE Course) Answers


2. <html>
<head>
<title>Fonts</title>
<link rel=”stylesheet” href=”question4.css”/>
</head>
<body>
<h1>My Favorite Websites</h1>
<br>
<a href=”espn.html” target=”_blank”>ESPN Soccernet</a><br>
<a href=”lord.html” target=”_blank”>Lord of the Rings</a><br>
<a href=”yahoo.html” target=”_blank”>Yahoo</a><br>
<a href=”#” onClick=”history.go(-1);return true;”>Back to Main Page</a>
</body>
</html>
3. <HTML>
<HEAD>
<TITLE>Forms</TITLE>
</HEAD>
<body>

<form action=”send.php” method=”post”>
<table cellspacing=”15”>
<tr><td>
<b>What kind of car would you like to buy?</b></td>
</tr>
<tr><td>
<input type=”radio” name=”car” value=”Proton” checked> Proton
<input type=”radio” name=”car” value=”Honda”>Honda
<input type=”radio” name=”car” value=”Ferrari”>Ferrari
<input type=”radio” name=”car” value=”Ford”>Ford</td></tr>
<tr><td>
<b>What colour do you want on your car?</b></td></tr>

Computer Applications – X (CBSE Course) Answers  31


<tr><td>
<SELECT NAME=”colour”>
<OPTION VALUE=”BLACK”>BLACK</OPTION>
<OPTION VALUE=”WHITE”>WHITE</OPTION>
<OPTION VALUE=”BLUE”>BLUE</OPTION>
<OPTION VALUE=”GREEN”>GREEN</OPTION>
</SELECT>
</td><td>
Other:<input type=”text” name=”other” value=”” size=”30”></td></tr>
<tr><td>
<b>Enter other specification of your preferred car:</b></td></tr>
<tr><td>
<TEXTAREA NAME=”specific” ROWS=”4” COLS=”25”></TEXTAREA></td></tr>
<tr><td>
<b>Tell us how to get in touch with you:</b></td></tr><tr><td>
Name:</td><td><input type=”text” name=”name” value=”” size=”30”></td></tr><tr><td>
Email:</td><td><input type=”email” name=”email” value=”” size=”30”></td></tr><tr><td>
Tel:</td><td><input type=”text” name=”phno” value=”” size=”30”></td></tr><tr><td>
Location:</td><td><input type=”text” name=”loc” value=”” size=”30”></td></tr><tr><td>
<input type=”checkbox” name=”contact” value=”contact”>Please contact me as soon as possible
regarding this matter.</td></tr>
<tr><td>My email: ezmir.razali@mmu.edu.my</td></tr><tr><td>
<input type=”submit” value=”Send”>
<input type=”reset” value=”Clear”></td></tr><tr><td>
<a href=”#” onClick=”history.go(-1);return true;”>Back to Main Page</a></td> </tr>
</form>
</body>
</HTML>
4. h1{
font-family: “Times New Roman”, “Arial Narrow”, Calibri;
font-style: normal;
font-size: 35px;
color: blue;
32 Computer Applications – X (CBSE Course) Answers
}
a:link{
text-decoration:none;
color: blue;
}
a:hover {
background-color: yellow;
color: blue;
}
.dark {
font-style: bold;
}
5. <html>
<head>
<title>Fonts</title>
<link rel=”stylesheet” href=”question4.css”/>
</head>
<body>
<h1>Lab Exercise 3: HTML and CSS</h1>
<hr>
<b>Name:</b>Ezmir b. Mohd Razali<br>
<b>ID:</b>12345678<br>
<b>Date of submission:</b>28.6.2004<br>
<br><br>
<ul>
<li><a href=”question2.html” target=”_blank”> Question 2</a>>/li>
<li><a href=”question3.html” target=”_blank”> Question 3</a>>/li>
</ul>
</body>
</html>

Computer Applications – X (CBSE Course) Answers  33


Chapter 8
Cyberethics

A. 1. A 2. C 3. C 4. B 5. A 6. D 7. A 8. D 9. A 10. C
B. 1. Intellectual property 2. privacy 3. Spamming 4. Piracy
5. Cybercrime 6. Worms 7. Adware 8. Hijack This
9. Spyware 10. warez
C. 1. T 2. T 3. F 4. F 5. T 6. T 7. F 8. T 9. F 10. T
D. 1. Computer ethics deals with the procedures, values and practices that govern the process of
consuming computing technology and its related disciplines without damaging or violating the
moral values and beliefs of any individual, organization or entity.
2. Netiquette is short for “Internet etiquette.” Just like etiquette is a code of polite behaviour in
society, netiquette is a code of good behaviour on the Internet.
3. Software piracy is defined as illegally copying software that does not belong to you in a manner
that violates the copyright.
Shareware is built on the concept of “try it before you buy it.” A version of the software that is
missing features or cannot be used more than a certain number of times or days is distributed
freely. This gives the user the opportunity to try the software, and determine if it fits their
needs.
4. As the license for using software is high therefore in developing countries like India it is difficult
to stop piracy.
5. If you become a software developer and wish to prevent software piracy you must keep the
following in mind :
• Educate your staff on the licensing requirements of your software purchases
• Conduct a self-audit of your software licenses
• Acquire any licenses needed for full compliance
• The most widely used method is the license key; code that is built into an application to
require a valid key to unlock the software.
6. Spamming remains economically viable because advertisers have very little or sometimes no
operating costs beyond the management of their mailing lists, and it is almost impossible to hold
senders accountable for their mass mailings. On the other hand it costs huge to the sender and
may sometime even get dubbed.

34 Computer Applications – X (CBSE Course) Answers


7. Industrial property can usefully be divided into two main areas:
• The first area may be characterized as the protection of trademarks (distinctive signs) which
distinguish the goods or services of one undertaking from those of other undertakings. Also
the geographical indications which identify a good as originating in a place where a given
characteristic of the good is essentially attributable to its geographical origin.
• The second area of protection of industrial property is primarily aimed to stimulate innovation,
design and the creation of technology. Thus inventions (protected by patents), industrial
designs and trade secrets. Socially it provides protection for the results of investment in
the development of new technology, thus giving adequate incentive and means to finance
research and development activities.
8. To reduce spamming:
a. Train your filter in your mailbox to recognize spams.
b. Never respond to spam.
c. Hide your email address.
d. Use a third-party anti-spam filter
e. Change your email address in case it is compromised with spams.
9. Cyberlaw is important because it touches almost all aspects of transactions and activities on
and concerning the Internet, the World Wide Web and Cyberspace. Initially it may seem that
Cyberlaws is a very technical field and that it does not have any bearing to most activities in
Cyberspace.
10. Flaming is the online act of posting insults, often laced with profanity or other offensive language
on social networking sites. Deliberate flaming, as opposed to flaming as a result of emotional
discussions, is carried out by individuals known as flamers, who are specifically motivated to
incite flaming.
Application-based questions:
1. i. He may either use a portable external hard disk or a pen drive to take backup.
ii. Hacking, is the act of stealing personal or private data, without the owner’s knowledge or
consent, it could also include other things like stealing passwords, creating a bot net, or pretty
much any act that breaches someone’s privacy, without their knowledge, or consent. Cracking
on the other hand involves editing a program’s source code, or creating a program, like a key
generator (more commonly known as a ‘keygen’), patch, or some sort of application that tricks
an application in to thinking that a particular process has occurred. For example, a key generator
and a patch for the
Adobe Master Collection would trick the software in to thinking that the key entered is correct,
and not let it verify the key with the Adobe master server. Cracking is pretty much looking for a
back door in software, and exploiting it for malicious use or for a copyright breaching act.

Computer Applications – X (CBSE Course) Answers  35


Thus the difference is that a hacker is someone that uses their extensive knowledge of computer
logic and code for malicious purposes, while a cracker - looks for back doors in programs, and
exploits those back doors. Cracking is generally less harmful than hacking. Hackers are usually
involved with web related hacking, like MySQL interception, or phishing, other forms of hacking
would include things like brute force, or password lifting.
iii. a. QuickHeal
b. Hyper V Recovery Manager from Microsoft
c. Google Drive
d. Notepad
2. i) 1) In case you have a spyware, your bank account details may be compromised.
2) The site may not be authentic and there may be Phising attack.
ii) Data Encryption refers to scrambling information and utilizing it to secure data that is
constantly hung on a machine, replicated onto CDs or DVDs or transmitted over a system. It
utilizes innovations, for example, Virtual Private Networks(VPNs) and secure socket layers.
iii) QuickHeal

36 Computer Applications – X (CBSE Course) Answers


Chapter 9
Scratch Programming

A. 1. C 2. D 3. A 4. C 5. D 6. C 7. A 8. C 9. A 10. A
B. 1. Script 2. Stage 3. Sounds 4. Untitled 5. Looks
6. Green 7. .sb2 8. Control 9. Repeat 10. 480
C. 1. T 2. F 3. T 4. F 5. T 6. T 7. F 8. T 9. T 10. T
D. 1. A set of instructions given to the computer to perform a certain task is called a program.
2. Pen Up, Pen Down, Clear
3. forever
4. Sprites are the images or characters on a Scratch stage that is either user-created, uploaded, or
found in the sprites library, that perform actions in a project using a set of instructions called
script.
5. Motion
6. Scripts, Costumes, Sounds
7. The Scripts Area is an area on the right side of the editor where scripts could be stored. A script
is a collection or stack of blocks that all interlock with one another. The blocks and their order
are very important, as they determine how sprites interact with each other and the backdrop.
8. The stage is where a Scratch project is physically run, so when one plays a game, the Stage is the
window in which it is run. By default, the Scratch Cat is on the stage.
9. File, Edit, Tips and About.
10. An example backdrop that comes with Scratch. A backdrop is one out of possibly many frames,
or backgrounds, of the Stage. It is located in the backdrops library. The Stage can change its look
to any of its backdrops.
Application based questions
1. The steps are:
i. Click on the File->Save menu.
ii. The ‘Save Project’ dialog appears, where select the D drive and the “projects” folder.
iii. Provide a Filename and click on the “Save” button.

Computer Applications – X (CBSE Course) Answers  37


2.

3. To change the backdrop:


i. From the bottom left corner of the Scratch window, click on Backdrop Library button.
ii. The Backdrop Library dialog opens up where you can select the desired “Category” from the left
hand panel and select the corresponding backdrop from the right hand panel.
iii. Click on the OK button once you are done with the selection.
To change the sprite:
i. From the Scripts Area click on Sprite Library button.
ii. The Sprite Library dialog opens up. From the Category panel select a desired category and from
the Library panel select the desired sprite and click on the OK button.
Lab Exercise
1.

2.

38 Computer Applications – X (CBSE Course) Answers


3.

4.

5. The code corresponding to up arrow key is :

The code corresponding to down arrow key is :

The code corresponding to left arrow key is :

Computer Applications – X (CBSE Course) Answers  39


The code corresponding to right arrow key is :

The code corresponding to the space bar is:

40 Computer Applications – X (CBSE Course) Answers


Chapter 10
Introduction to Python

A. 1. B 2. D 3. A 4. B 5. B
B. 1. break 2. continue 3. = 4. // 5. Comments
C. 1. F 2. F 3. T 4. F 5. T
D. Answer the following questions.
1. a. int b. float c. str d. str
2. a. One
Two
Three
b. invalid syntax in the second line
c. One Two=Three
d. 5+6:11
7*6*5=210
Three
3. A variable is a name given to a memory location that can contain a data value.
4. Conditional statements are specific statements that allow us to check a condition and execute
certain parts of code depending on whether the condition is true or false.
The different conditional statements are: if, if-else, if-elif-else
5. The body of the conditional statement is indicated by the indentation. Body starts with an
indentation and the first un-indented line marks the end.
6. Relational operators are used to compare the relationship between two data-items in a
conditional expression.
7. The = is an assignment operator and is used to assign a value to a variable. The == is a relational
operator and is used to compare two values for equality.
8. Logical operators are used to join more than one relational expression. The following table
shows the different logical operators:

Computer Applications – X (CBSE Course) Answers  41


Logical Operator Name Behavior
and AND operator Checks whether the conditions preceding and
succeeding it is true or not.
or OR operator Checks whether either of the conditions preceding and
succeeding it is true or not.
not NOT operator Just negates the logic of the condition succeeding it to
check for its validity.
9. An if within another if is called nested if statement.
10. Python allows you to write if-else statement in a concise manner. This operator is used as an
alternative to if statement. This operator can be used to replace if-else statements of the general
form:
if test-expression:
statement1
else:
statement2
The above form of if can be alternatively written using conditional expression as follows:
[statement1] if [test-expression] else [statement2]
11. The following example shows the formation of grade depending upon the marks obtained by
students in a school.
Marks Grade
90 to 100 A
70 to 89 B
50 to 69 C
30 to 49 D
below 30 E
The corresponding code for the grading system would be:
if marks>=90:
println(“Grade A”)
elif marks>=70:
print(“Grade B”)
elif marks>=50:
print(“Grade C”)
elif marks>=30:

42 Computer Applications – X (CBSE Course) Answers


print(“Grade D”);
else:
print(“Grade E”);
In this code if someone gets 95 the condition marks>=90 gets satisfied and Grade A gets
printed. Again if marks is 85 the marks>=70, marks>=50 and marks>=30 all gets satisfied but
only marks>=70 will get executed as this the first satisfying statement in the else-if ladder and
therefore Grade B gets executed. Similarly if marks is 55, Grade C gets printed. Now if marks is
15, none of the above conditions gets satisfied and therefore the statement in the else part gets
executed, which prints Grade E.
12. i. X>=Y
ii. X!=Y
iii. X==Y
iv. X<Y and X<Z
v. X>Y or X<Z
vi. if X>20:
J+=1
else:
J-=2
vii. not(X>Y)
13. The for loop is used when the number of iteration is fixed. The while loop on the other hand is
used when the number of iterations is not known.
14. The indentation in a loop is used to mark the body of the loop.
15. The range() function is used to loop through a set of numbers for a specified number of times.
16. The break statement is used in a loop to exit from it.
17. The break statement is used to exit from a loop and continue statement is used to skip the
remaining statements in a loop and continue with the next iteration.
18. i. 1
2
3
ii. 1
2
3
3

Computer Applications – X (CBSE Course) Answers  43


iii. 1
3
5
7
9
iv. 19
17
15
13
11
v. no output
vi. 18 70
vii. 360
Lab Exercise
1. sp=eval(input(“Enter the Selling Price of the commodity:”))
cp=eval(input(“ Enter the Cost Price of the commodity:”))
if sp>cp:
print(“Profit:”,sp-cp)
elif cp>sp:
print(“Loss:”,cp-sp)
else:
print(“No profit or loss”)
2. n=eval(input(“Enter an integer:”))
if n>0:
print(“Positive”)
elif n<0:
print(“Negative”)
else:
print(“Zero”)
3. n=eval(input(“Enter an integer:”))
if n%2==0:
print(“Even”)
else:
print(“Odd”)
44 Computer Applications – X (CBSE Course) Answers
4. n=eval(input(“Enter an integer:”))
if n>10:
print(“Square”,n**2)
else:
print(“Cube”,n**3)
5. a=eval(input(“Enter a number:”))
b=eval(input(“Enter a number:”))
c=eval(input(“Enter a number:”))
d=eval(input(“Enter a number:”))
e=eval(input(“Enter a number:”))
av=(a+b+c+d+e)/5
if av>50:
print(“good”)
else:
print(“bad”)
6. n=eval(input(“Enter a number:”))
if n%5==0:
print(“Multiple of 5”)
else:
print(“Not a multiple of 5”)
7. n=eval(input(“Enter a number:”))
if 10<=n<=99:
print(“2 digit number”)
else:
print(“Not a 2 digit number”)
8. n=eval(input(“Enter a number:”))
if 100<=n<=999 and n%3==0:
print(“3 digit number divisible by 3”)
else:
print(“Not a 3 digit number or not divisible by 3”)
9. a. for i in range(2,101,2):
print(i)

Computer Applications – X (CBSE Course) Answers  45


b. for i in range(99,0,-2):
print(i)
c. for i in range(7,71,7):
print(i)
d. for i in range(80,7,-8):
print(i)
e. for i in range(1,11):
print(i*i)
f. for i in range(1,11):
print(i*i-1)
g. n=eval(input(“Enter a number:”))
s=1
for i in range(1,n):
print(s)
s=s+i
h. n=eval(input(“Enter a number:”))
s=2;p=2
for i in range(1,n):
print(s)
s=s+p
p+=2
i. n=eval(input(“Enter a number:”))
s=1;p=1
for i in range(1,n):
print(s)
s=s+p
p+=2
j. n=eval(input(“Enter a number:”))
f=1;s=0
for i in range(1,n):
t=f+s
print(t)

46 Computer Applications – X (CBSE Course) Answers


f=s
s=t
k. n=eval(input(“Enter a number:”))
f=1;s=0
for i in range(1,n):
t=f+s*2
print(t)
f=s
s=t
10. s=0
for i in range(1,20,2):
s+=i
print(“Sum:”,s)
11. s=0
for i in range(2,21,2):
s+=i
print(“Sum:”,s)
12. s=0
for i in range(100,999,2):
s+=i
print(“Sum:”,s)
13. s=0
for i in range(101,1000,2):
if i%5==0:
s+=i
print(“Sum:”,s)
14. n=eval(input(“Enter a number:”))
f=n
for i in range(1,n):
f*=i
print(“Factorial:”,f)

Computer Applications – X (CBSE Course) Answers  47


15. n=eval(input(“Enter a number:”))
for i in range(1,n+1):
if n%i==0:
print(i)
16. n=eval(input(“Enter a number:”))
c=0
for i in range(1,n+1):
if n%i==0:
c+=1
print(“No. of factors:”,c)
17. n=eval(input(“Enter a number:”))
c=0
for i in range(1,n+1):
if n%i==0:
c+=1
if c==2:
print(“Prime no.”)
else:
print(“Not a prime no.”)
18. s=0
for i in range(1,11):
n=eval(input(“Enter a number:”))
s+=n
print(“Sum:”,s)
19. s=0
for i in range(1,11):
n=eval(input(“Enter a number:”))
if n%2==0:
s+=n
print(“Sum:”,s)
20. s2=0;s3=0
for i in range(1,11):

48 Computer Applications – X (CBSE Course) Answers


n=eval(input(“Enter a number:”))
if n>=10 and n<=99:
s2+=n
elif n>=100 and n<=999:
s3+=n
print(“Sum:”,s2)
print(“Sum:”,s3)
21. l=0
for i in range(1,11):
n=eval(input(“Enter a number:”))
if i==1:
l=n
elif n>l:
l=n
print(“Largest:”,l)
22. l=0;sm=0
for i in range(1,11):
n=eval(input(“Enter a number:”))
if i==1:
s=l=n
if n>l:
l=n
if n<s:
s=n
print(“Largest:”,l)
print(“Smallest:”,s)

Computer Applications – X (CBSE Course) Answers  49

You might also like