0% found this document useful (0 votes)
42 views169 pages

IT All Imp

The document contains a series of fill-in-the-blank questions and answers related to advanced web designing, SEO, and advanced JavaScript concepts. It covers various HTML tags, CSS properties, SEO strategies, and JavaScript methods and properties. Each section provides essential terminology and definitions relevant to web development and optimization.

Uploaded by

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

IT All Imp

The document contains a series of fill-in-the-blank questions and answers related to advanced web designing, SEO, and advanced JavaScript concepts. It covers various HTML tags, CSS properties, SEO strategies, and JavaScript methods and properties. Each section provides essential terminology and definitions relevant to web development and optimization.

Uploaded by

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

1.

Advanced Web Designing

Q. Fill in the blanks.


1) <input type="_______"> defines a field for an email address.
Ans:-Email
2) To define a definition list _______ tag is used.
Ans:-<DL>
3) The ______________ positioning is the distance from previous element of the
web page from other element on web page.
Ans:-Relative
4) <meta http-equiv="________">, page session will get expire at specified date
and time.
Ans:-Expires
5) The __________ CSS file should not contain any HTML tags.
Ans:-External
6) The ______ attribute of <audio> tag sets the audio to play again specified no. of
times.
Ans:-Loop
7) The _______ element creates an inline frame.
Ans:-<iframe>
8) The float property defines the _____ of content.
Ans:-Flow.
9) ______ is used with elements that overlap with each other.
Ans:-Positioning.
10) ________ attribute is used to define a unique style for an element.
Ans:-ID.
11) The _____ attribute specifies that the audio output of the video should be
muted.
Ans:-Muted.
12) The _______ positioning property sets an element in a specific location and it
is not affected by the flow of the page.
Ans:-Absolute.
13) The list within another list is called ________ list.
Ans:-Nested.
15) The ________ attribute of <ol> tag specifies the numbering type for the list
items.
Ans:-Value
16) The __________ list can be numerical or alphabetical.
Ans:-Ordered.
17) In ________ style sheet we can use style element as an attribute of any tag.
Ans:-Inline.
18)_____ position property is used to set the element relative to its normal
position.
Ans:-Relative.
19) The _________ selector is used as a wild card character.
Ans:-Universal.
20) The _________ attribute of <input> tag specifies the minimum value for an
input field.
Ans:-Min.
21) The _______ property in CSS defines how the components are going to be
placed on the web page.
Ans:-Display.
22) The ________ attribute of <ol> tag specifies the list items are specified in
reverse order.
Ans:-Reversed
23)The _______ attribute of <meta> tag can have any textual matter related to
the name.
Ans:-Content.
24)Internal CSS is written inside _________ tag within head section of html.
Ans:-<style>.
25)The _______ attribute of <meta> tag specifies the name of the meta data.
Ans:-Name.
26) ________ attribute is used to give alternative text to the clickable region.
Ans:-Alt.
27) __________ style sheet uses the style attribute in the HTML start tag.
Ans:-Inline.
28) The _________ attribute of <input> tag specifies that the input field should
automatically got focus when the page loads.
Ans:-Autofocus.
29)__________ property adds a border to a web page element.
Ans:-Border.
30) _________ hosting provides free hosting of the website for limited period of
time.
Ans:-Free.
31) _______ tag is used to create the map of the image.
Ans:-<map>.
32) _________ property is the default position for HTML elements.
Ans:-Static.
33) ___________ style sheet is used to apply CSS on a single document or page.
Ans:-Internal.
34) Each list item starts with ______ tag.
Ans:-<LI>.
35) The ______ attribute of<audio> tag specifies the URL of the audio file.
Ans:-Src.
36) _________ is the service of providing storage space.
Ans:-Web hosting.
37) Internal CSS is written inside _________ tag within head section of html.
Ans:-<style>.
38) ___________ property allows to control the size of the font.
Ans:-font-size.
39) <met http-equiv="________">, browser sends the cookies back to the server.
Ans:-set-cookies.
40) In CSS, ID is written with the ___________ followed by the ID name.
Ans:-#.
41) __________ list is also called as bulleted list.
Ans:-Unordered.
42) _________ value of display property will completely remove an html element.
Ans:-None.
43)_____________ attribute of link tag defines the relationship between linked
file and html document.
Ans:-Rel.
44) ____________ attribute of <link> tag helps to specify the URL that is to be
linked in External CSS.
Ans:-Href.
45) ________ attribute is used to specify the style class to which the element
belongs.
Ans:-Class.
46) The <meta> tag is placed between the ______ and </head> tags.
Ans:-<head>.
47) _______ Tag is used to specify video on an HTML document.
Ans:-<video>.
48) To create a client side image map ______ attribute is used in <img> tag.
Ans:-Usemap.
49) There are ______ types of positioning in CSS.
Ans:-Four.
50) __________ property sets margin area on the bottom side of the element.
Ans:-margin-bottom.
51)The _______ attribute of <meta> tag is used for http response message
headers.
Ans:-http-equiv.
52) ___________ specifies an input field is read only.
Ans:-READONLY.
53) The _______ attribute sets the height of the video player.
Ans:-Height.
54) The companies that provides web hosting services are called ______.
Ans:-web hosts.
55)<input type="_______"> defines a date picker with the year, month, day and
time.
Ans:- datetime-local.
56) The ______positioning helps to put the text fixed on the browser.
Ans:-Fixed.
57) An image with multiple hyperlinks is called an ____________.
Ans:- image map.
58) <input type="_______"> defines a field for entering a URL.
Ans:-URL.
59) <input type="_______"> defines a field for an email address.
Ans:-Email.
60) <meta http-equiv="________">, page session will get expire at specified date
and time.
Ans:-Expires.
61) The _________ selector is used to select all the elements with the same style
definition.
Ans:-Grouping.
62) The _________ attribute of <input> tag specifies that the input field should
automatically got focus when the page loads.
Ans:-Autofocus.
63) _____ property is used to change the Text color of webpage through style
sheet.
Ans:-Color.
64) The _____ attribute specifies that the audio output of the video should be
muted.
Ans:-Muted.
65)The ___________ block can contain one more declarations separated by a
semicolon.
Ans:-Declaration.
66) The _______ tag is used to specify multiple media resources for media
elements.
Ans:-<source>.
67) ___________ property helps in controlling the horizontal spacing between
characters of text.
Ans:-letter-spacing.
68) The _______ attribute of <meta> tag can have any textual matter related to
the name.
Ans:-Content.
69) _____________ tag is used to link style sheet properties to html document.
Ans:-<link>
70) _________ value of display property will allow to set the width and height to
an inline element.
Ans:-block-inline.
71) _______ value of the text-decoration property is used to give line over the
text.
Ans:-Overline.
72) __________ describes how HTML elements are to be displayed on screen,
paper, or in other media.
Ans:-CSS.
73) ________ is a CSS property written in CSS file or directly in the style of an
element.
Ans:-Float.
74) The ______ attribute specifies coordinates of the clickable regions on image
map.
Ans:-Coords.
75) In image mapping clickable regions are called as ______.
Ans:-Hotpots.
76) The float property defines the _____ of content.
Ans:-Flow.
77) The ________ attribute of <ol> tag specifies the starting number of the first
item.
Ans:-Start.
78) The _________ attribute of <input> tag specifies that the user is allowed to
enter more than one value in the <input> element.
Ans:-Multiple.
79) _________ value of display property is used to display an element as block
element.
Ans:-Block.
80) Average time spend by the visitor on the website is known as _______
duration.
Ans:-Session.
81) <input type="_______"> defines a control for entering a time.
Ans:-Time.
82) The ________ tag is used to define the terms definition.
Ans:-<DD>.
83) The _____ attribute specifies the HTML content of the page to show in the
<iframe>.
Ans:-Srcdoc.
84) The website is made available on the Internet with the help of ________.
Ans:-web hosting.
2.SEO
Q.- Fill in the blanks.
1)_______ is a free SEO Audit Tool that will perform a detailed SEO Analysis.
Ans:-SEOptimer
2) _____________ service allows you to save, organize and share bookmarks with other users.
Ans:-Bookmarking
3) ________ SEO techniques that search engines do not approved.
Ans:- Black Hat
4) <img> tag with ______ attribute also contribute to optimization.
Ans:-Alt
5) ___________ deals with enhancing the website ranking, using interactive communities.
Ans:-SMO
6)___________ are the links on the website that, when clicked, take the user to another site.
Ans:-Backlinks
7) SEM stands for ______.
Ans:- Search Engine Marketing
8) __________ tag should be self enclosed.
Ans:-Singular.
9) HTML programs should start with ______.
Ans:- <!doctype html>
10) One of the optimizing factor to improve images is by using _____ attribute.
Ans:-Alt
11)Social bookmarking is a powerful tool used for _____ website.
Ans:-Promoting
12) White Hat strategies include ______ content.
Ans:-Relevant
13) Black Hat strategies include ______ content.
Ans:-Duplicate
14) _______ SEO strategies include complete sentences with good spelling and grammar.
Ans:-White Hat
15) SEO is a ________ of Search Engine Marketing.
Ans:-Subset
16) Well-labeled images are the part of ________ SEO strategies.
Ans:- White Hat
17) _____ is the first thing that user notices in search result list while using Google for search.
Ans:-Title
18) ________ is a powerful tool in promoting a website.
Ans:-Social bookmarking
19) Website _______ has become a ranking factor for Google.
Ans:- mobile friendliness
20) __________ file tells search engine which page you want to exclude from indexing.
Ans:- Robots.txt
21) SEOptimer is a free _______ that will perform a detailed __________.
Ans:-SEO Analysis
22) SMO stands for ______
Ans:-Social Media optimization
23) Title content should be upto to ____ characters.
Ans:- 60
24)SEOptimer is a free _______ that will perform a detailed SEO Analysis.
Ans:-SEO Audit Tool
25) _______ deals with enhancing the websites ranking, using interactive communities.
Ans:-Social Media optimization
26) _______ are the links on the website that, when clicked, take the user to another website.
Ans:-Backlinks
27) _________ are website links that are stored for future references.
Ans:-Bookmarks
28) Using _______ you can quickly create high-quality backlinks.
Ans:-Social bookmarking
29) _______ SEO is concerned with information that is displayed to the end user.
Ans:-On-Page
30) ____ SEO include link building, increasing link popularity by submitting open directories.
Ans:- Off-Page
31)Meta Description should be between …………… characters(spaces included).
Ans :- Meta Description
32)……………. Content should be upto 60 characters( spaces included).
Ans : Title
33)Meta Description should be used to boost your ……………………..
Ans :- On-Page SEO
34)…………. Is an important part of the Search Engine optimization as well as search engine
marketing.
Ans :- Keyword research and analysis.
35) …………………… represent vote of confidence from one site to another.
Ans :- Backlinks.
3. ADVANCED JAVASCRIPT
1) _________ property of window object sets or returns the fact in the status
bar of a window.

Status

2) ________ method of math object returns the lowest valued number in a


list of numbers.

min()

3) _________ method of string object returns the character at the specified


position.

charAt()

4) The way in which HTML document content is accessed and modified is


called as _________

Document Object Model

5) _________ method of window object removes focus from the current


window.

blur()

6) _________ method of Math object returns the cube root of a number.

cbrt()

7) The ________ property of DOM object sets or returns title of the document.

Title

8) _________ method of date object sets the full year.

setFullYear()

9) ________ method of array object checks whether an object is an array.

isArray()

10) _______ method of math object returns a random number between 0


and 1

random()

11) _________ method of window object sets focus to the current


window.

focus()

12) ________ event handler occurs when user clicks reset button.

Onreset
13) _______ property of window object sets or return the name of the
window.

Name

14) ________ method of array o object adds new elements to the end of
an array.

push()

15) Using _______ method id properly is used to find an element.

getElementById()

16) _________ method of array object joins two or more arrays and
returns a copy of the joined arrays.

concat()

17) ________ method of string object convert a string to upper case.

toUpperCase()

18) _________ method set the seconds of a date object.

setSeconds()

19) ________ is an interpreted scripting language.

JavaScript

20) ________ property of string object returns number of characters in a


string

Length

21) ________ method of array object removes the last element of an


array and returns that element.

pop()

22) _________ method of DOM object writes HTML expressions or


JavaScript code to a document.

write()

23) ________ method of number object converts the given string into a
Integer number.
parseInt()
24) _______ object is used to store or manipulate text.

String

25) ________ property of Number object returns the minimum value.

MIN_VALUE
26) _________ method of date object sets the day of the month.

setDate()

27) _________ method of window object displays a dialog box to get


input from the user.

prompt()

28) __________ method of window object closes the current window.

close()

29) ________ method of string object convert a string to upper case.

toUpperCase()

30) DOM stands for ___________

Document Object Model


31) Using _______ method id properly is used to find an element.

getElementById()

32) __________ method of string object returns the index of last


occurrence of specified character in given string.

lastIndexOf()

33) _________ method set the seconds of a date object.

setSeconds()

34) _______ method of math object returns the highest valued number in
a list of numbers.

max()

35) _________ property of window object returns a Boolean value


indicating whether a window has been closed or not.

closed

36) _________ property of window object returns a Boolean value


indicating whether a window has been closed or not

Closed

37) ________ method of string object converts a string to lower case.

toLowerCase()

38) ________ event handler occurs when user changes content of an


element or selects drop down list.

Onchange
39) ________ method of Array object copies array elements within the
array, to and from specified position

copyWithin()

40) _______ property of Number object represents not a number value.

NaN

41) JavaScript has a built-in multiway decision statement known as


______

Switch

42) _________ method of date object returns the day of the month.

getDate()

43) _________ method of window object display the alert box contain
message with OK button.

alert()

44) _______ property of window object sets or return the name of the
window.

Name

45) _________ method of window object opens the new window.

open()

46) _________ method of Array object calls a function for each array
element.

forEach()

47) _______ method of array object sorts the elements of an array.

sort()

48) _________ method of date object returns the minutes.

getMinutes()

49) _________ method of window object calls a function or evaluates an


expression after a specified number of milliseconds.

setTimeout()
50) An _________ is a special variable which can hold more than one
value at a time
Array
51) ________ event handler occurs when user changes content of an
element or selects drop down list.
Onchange
52) ________ method of math object returns the next integer less than or
equal to a given number.
floor()
53) _________ property of window object returns the document object
for the window.
Document

54) ________ property of string object returns number of characters in a


string.
Length
55) _________ method of Array object search the array for an element
and returns its position
indexOf()
56) _________ method of number object determines whether the given
value is a Integer
isInteger()
57) _________ method of window object calls a function or evaluates an
expression after a specified number of milliseconds.
setTimeout()
58) _________ event handler occurs when user leaves field or looses
focus of an element
Onblur
59) _________ means increment or decrement value of a running
variable.
Iteration
60) The way in which HTML document content is accessed and modified is
called as _________
Document Object Model
61) _________ method of string object returns the character at the
specified position.
charAt()
62) _______ object is used to store or manipulate text.
String
63) ________ method of array o object adds new elements to the end of
an array.
push()
64) ________ method of array object removes the last element of an
array and returns that element.
pop()
65) ________ even handler occurs when an element gets focus.
Onfocus
4.Emerging Technologies
Q. Fill in the blanks
1) GitHub is an example of _______.
Ans:-SaaS.
2) IoT helps to __________ human efforts.
Ans:-Reduce.
3) _________ involves analyzing and understanding human language and
responding it.
Ans:-Natural Language Processing.
4) SaaS stands for ________.
Ans:-Software as a Service.
5) _______ computing solutions are more portable.
Ans:-Cloud.
6) _______ is the next generation of wireless communication.
Ans:-5G.
7) _______ vendors provide users with software and application via a subscription
model.
Ans:-SaaS.
8) AI stand for _____________.
Ans:-Artificial Intelligence.
9) 5G Technologies may use a variety of _________.
Ans:- Spectrum Bands.
10) Smart Home is the application of ________.
Ans:-IoT.
11) ______ employs pattern recognition and deep learning to understand content
of pictures and videos.
Ans:-Computer vision.
12) ________ is an area of computer science that emphasizes on creation of
intelligent machines that work and react like human.
Ans:- Artificial Intelligence.
13) In Iaas __________ is scalable depending on processing and storage needs.
Ans:-Infrastructure.
14) __________ computing is about creating a natural, human-like interaction
including using the abilities to interpret speech and respond to it.
Ans:-Cognitive.
15) Chatbot are example of _____________.
Ans:-Digital Assistance.
16) Artificial Intelligence helps to ________ human errors.
Ans:-Reduce.
17) ________ is used for application like image and speech recognition.
Ans:-Deep learning.
18)Machine learning is a sub field of ___________.
Ans:-Artificial Intelligence.
19) IoT stands for _______.
Ans:-Internet of Things.
20) IoT devices can collect data from _________.
Ans:-Environment.
21) SaaS service provider delivers _________ and application through internet.
Ans:-Software.
22) _______ is secure on cloud.
Ans:-Data
23) Amazon Web Services is an example of ______.
Ans:-IaaS.
24) 5G is the next generation of _________ communication.
Ans:-Wireless.
25) In _________ user do not install application on their local devices.
Ans:-SaaS.
26) ________ provides a platform with tools to test, develop and host application
in the same environment.
Ans:-PaaS.
27) ________ computing solutions are inexpensive than the actual overall
infrastructure set up for the Ans:-I.T. services.
Ans:-Cloud.
28) ________ computing solutions are more reliable than in-house I.T.
infrastructure.
Ans:-Cloud.
29) 5G stands for ____________.
Ans:- Fifth Generation.
30) The data collected using IoT devices can be used to take _____.
Ans:-Decisions.
31) ________ cloud environment combines both Public and Private element.
Ans:-Hybrid.
32) IaaS stands for ________.
Ans:- Infrastructure as a Service.
33) In _________ cloud all data is protected behind the firewall.
Ans:-Private.
34) LTE stand for ___________.
Ans:-Long Term Evolution.
35) The internet of things is the _________ of physical devices, vehicles, home
appliances, etc.
Ans:-Network.
36) Illumination of light is controlled on the basic of day light is example of
______.
Ans:-Smart Lighting.
37) Users do not have to manage, install or upgrade software, __________
manage this.
Ans:-SaaS providers.
38)Deep learning is a sub field of _______.
Ans:- Artificial Intelligence.
39) _______ enables organization to focus on development without having a
worry about underplaying infrastructure.
Ans:-PaaS.
40) In SaaS the application reside on a remote cloud network accessed through
the web or an _______.
Ans:-API.
41) _________ is more efficient and inexpensive than other cloud solution.
Ans:- public cloud.
42) In ________ all the services and supporting infrastructure are shared across
multiple users.
Ans:- public cloud.
43)_________ imitate the brain array of interconnected neurons.
Ans:-Neutral networks.
44) _________ allows users to schedule, monitor and remotely control home
temperatures.
Ans:-Smart thermostats.
45) ___________ solutions are preferred for enhanced security and privacy by the
users.
Ans:- Private cloud.
46) _______ gives user access to storage, networking, servers and other
computing.
Ans:-IaaS.
47) ______ is the faster method of data transfer.
Ans:-5G.
48) PaaS provide a _________ with tools to test, develop and host application in
the same environment.
Ans:-Platform.
49) IaaS provides automated and scalable _________ that provide a high degree
of control and flexibility for the user.
Ans:-Environment.
50) PaaS stands for _______.
Ans:-Platform as a Service.
5.PHP
1)Information sent from a form with ________ method is invisible to everyone.

Ans : POST

2) The ______ statement allows programmer to make decision based on one more
conditions.

Ans : If

3) PHP is ________ side scripting language.

Ans : Server

4) Information sent from a form with ______ method is visible to everyone.

Ans : GET

5) Information can be passed to functions through _______

Ans : Arguments

6) A ______ is a small text file that the server sends on the users computer.

Ans : Cookie

7) The _________ arrays are the arrays with numeric index.

Ans : Indexed

8) ________ is an array of variables passed via the HTTP headers.

Ans : $_POST

9) The __________ arrays are the arrays containing one or more arrays.

Ans : Multi-dimensional

10) _______ function replaces some characters with some other characters in a
string.

Ans : str_replace()

11) ________ functions counts the number of words in a string.

Ans : str_word_count()
12) The _________ statement is used to let a function return a value.

Ans : Return

13) ________ is an array of variables passed via the URL parameters.

Ans : $_GET

14) The form data is sent with the ________ method.

Ans : HTTP POST

15) _______ functions returns the length of a string.

Ans : strlen()

16) An ________ stores multiple values in single variable.

Ans : Array

17) _____ keyword is used to display text on web page.

Ans : echo

18) ______ method has no limits on the amount of information to send.

Ans : POST

19) The _______ PHP functions is used to create an array variable.

Ans : array()

20) _________ are the statements in PHP code, which are not visible in the output
of the program.

Ans : Comments

21) _______ method may be used for sending non sensitive data.
Ans : GET
22) The ________ statement allows programmer to make decision based on either
this or that condition.

Ans : if else

23) A variable declared outside a function has a ______ scope and can only be
accessed outside a function.

Ans : Global
24) PHP is _________ language, there is no need for compilation.

Ans : Interpreted

25) A variable declared within a function has a ______ scope and can only be
accessed within that function.

Ans : Local

26) _______ function searches for specific text within a string.

Ans : strpos()

27) A ________ is series of characters.

Ans : String

28) _________ converts the first character of each word in a string to uppercase.

Ans : ucwords()

29) An _________ is a special variable which can hold more than one value at a
time.

Ans : Array

30) _________ function removes whitespace and other predefined characters from
both sides of a string.

Ans : trim()

31) The _______ function is used to return the length of an array.

Ans : count()

32) There are _______ types of arrays in PHP.

Ans : Three

33) The ________ arrays are the arrays with named keys.

Ans : Associative

34) ______ object helps to connect PHP code with any database server.
Ans : PDO()
35) ________ function converts a string to lowercase.

Ans : strtolower()
36) A ______ is a computer system that serves as a central repository of data and
programs.

Ans : Server

37) ________ helps web application to maintain user information on all the pages.

Ans : Session

38) _________ are used to execute the same block of code repeatedly as long as
certain condition is satisfied.

Ans : Loop

39) _______ function returns a part of a string.

Ans : substr()

40) ______ is a symbol or name that stands for a value.

Ans : Variable

41) ________ is used to identify user or its machine and track activities created on
the user computer.

Ans : Cookie

42) When browser requests server page _______ are sent along with the request.

Ans : Cookie

43) The server side environment that runs a scripting language is called _______

Ans : Web Server

44) ________ are specified after the function name, inside the parentheses.

Ans : Arguments

45) ________ function counts the number of times a substring occurs in a string.

Ans : substr_count()

46) ________ function reverses a string.


Ans : strrev()
47) A variable starts with the _______ sign followed by the name of the variable.

Ans : $

48) _______ method in PHP is used to check whether variable has value or not.

Ans : isset()

49) PHP files have extension ________

Ans : .php
6. E-Commerce and E-Governance
1)E-Commerce stands for ………………………..
Ans : Electronic Commerce.
2)…………….. is also referred as a paperless exchange of business information using
EDI, E-Mail, electronic fund transfer etc.
Ans : E-Commerce
3)………………….. can be broadly defined as the process of buying and selling of
goods or service using an electronic medium such as internet.
Ans : E-Commerce
4)E-Commerce helps the ………………………. To deliver public services.
Ans : government
5)E-Commerce scope is ………………
Ans : Global
6)……………………. Is the series of exchanges between a customer and supplier that
takes place when a commercial exchange is executed.
Ans : Trade- cycle.
7)………………………. Consist of Search and negotiate.
Ans : Pre-sales
8)…………………………… consist of order and delivery.
Ans : execution
9)…………………………….consist of invoice and payment.
Ans : settlement
10)………………………………phase consist of warranty and after-sales services.
Ans : after-sales
11)…………………… are most common way for customers to pay online.
Ans : credit cards
12)……………….. is used when money is sent from one bank account to another.
Ans : bank transfer
13)E-wallet is a type of ………………….. account in which a user can store money for
any future online transactions.
Ans : pre-paid
14)……………………….. is protected with password.
Ans : E-wallet
15) EDI stands for …………………….
Ans : Electronic Data Interchange
16)G2C stands for…………………
Ans : Government-to –Citizen
17) G2B stands for…………………
Ans : Government-to-business
18)G2G stands for---------------------------
Ans : Government-to-Government
19)G2E stands for---------------------
Ans : Government-to-Employee
20)The ……………………… is the internal part of G2G sector.
Ans : G2E (Government-to-Employee)
21)…………….. provides online facilities to the employees like applying for leave,
reviewing salary payment record and checking the balance of holiday.
Ans : G2E
22)The ……………………… sector provides human resource training and
development.
Ans : G2E
23)……………….. is a campaign launched by the government of India in order to
make government’s services available to citizens electronically.
Ans : Digital India
24)…………………….. is widely used on the internet to protect user information
being sent between a browser and server.
Ans : Encryption
25) Encryption converts plain text in to……………….
Ans : Cipher Text

26)Decryption Converts …………..into Plain Text .


Ans: - Cipher Text

27) …………………is also known as electronic Signature


Ans : Digital Signature

28)……….. guarantees the authenticity of an electronic document or message in


digital communication and uses encryption technique to provide proof of original
and unmodified documentation.
Ans : Digital Signature

29) A ……………….. is an electronic password .


Ans :- Digital certificate.

30)Digital certificate allows a person to exchange data securely over internet


using…………… infrastructure.
Ans:- PKI

31)Digital certificate is also known as …………….. or identity certificate.


Ans :- Public Key certificate.
2. SEO
Q.1)What is SEO?

1. SEO stands for Search Engine Optimization.


2. SEO is a technique used for designing and developing a website be to
rank high in search engine results.
3. It is a subset of search engine marketing.

Q.2) Explain Types of SEO?


There are two types of optimization

 On-Page SEO : It includes Provision of good content, good keywords


selection, putting keywords on correct places, giving appropriate title to
every page etc.
 Off-Page SEO : It includes link building, increasing link popularity by
submitting open directories, search engines, link exchange etc.

(Q3)Explain Techniques of SEO?


Answer:-These are classified into two broad categories:

 White Hat SEO : Techniques that search engines recommends as apart of


good design.
 Black Hat SEO : Techniques that search engines do not approve. The
techniques used for optimizing the website are manipulative.

Q4)What are SEO Keywords?


SEO keywords are the important words and phrases related to the developed
website content for ranking.

1. A list of keywords should need to be carefully choosen to optimize the


search.
2. Keyword Research and Analysis is an important part of the Search Engine
Optimization (SEO) as well as"Search Engine Marketing"
3. There are various online Keyword Planner tools (such as Google Add Words
keyword planner) to shortlist keyword.

Q5)What are SEO-Backlinks?

1. Backlinks are links on one website that, when clicked, take the user to
another site.
2. Backlinks are especially valuable for SEO because they contribute to the
overall strength and value of the content.
3. They also represent a "vote of confidence" from one site to another.

Science Q7. Question & Answer Page 1


4. In short, backlinks to your website are a signal to search engines that
others are interested to know about the contents form your website.

(Q6)List down all the factors which are required for Optimizing Website?

1. SEO : Page structure optimization


2. SEO Keywords
3. SEO Social Bookmarking
4. SEO-Social Media Optimization (SMO)
5. SEO-Backlinks
6. Speed of the website
7. Mobile friendly.

Q7)Explain Page Structure Optimization?

1. Html programs should start with <!doctype html>


2. If it is singular tag eg.<img> it should be self enclosed like this <img />
3. Order of tag should be proper.
4. Most of the time recently opned tag will be closed first.
5. While creating a web page,Metadescription should be used to boost your
ON-page SEO.
6. The pages should include proper heading tags from <h1> to <h6> wherever
required.

Q8)What is SEO Audit?


An SEO Audit helps to find out what could be done to improve ranking on
search engines, so that consumers could find the website with greater
ease. It analyses the websites health.Eg-Seomator, SEOptimer are few free
SEO audit tools available on net.
SEOptimer is a free SEO Audit Tool that will perform a detailed SEO Analysis.
It provides clear and actionable recommendations that can be taken to
improve your online presence.
Q9)Explain White Hat Techniques
WhiteHatSEO:Techniques that search engines recommends as apartof
good design.
 Relevantcontent
 Well-labeledimages
 Relevantlinksandrefernces
 Completesentenceswithgoodspellingand grammar
 Standard-compliantHTML
 Uniqueandrelevantpagetitles

Science Q7. Question & Answer Page 2


Q10) Explain Black Hat Techniques
 Duplicatecontent
 Invisibletextandstuffedkeyword
 Clokingorre-directingtheusertoanother site orpage
 Linksfromsiteswithnon-relveantcontent

Q11)Explain SEO Social Bookmarking?

1. Social Bookmarking is a powerful tool in promoting a website.


2. It is very useful for off-page SEO optimization.
3. Bookmarks are website links that are stored for future references.
4. Bookmarking service aloows you to save, organize and share bookmarks
with other users.
5. With social bookmarking,you can quickly create high quality backlinks.

4. Emerging Tech(IOT)
1.Define IoT with Example?

1.Give some applications of IOT.

A) Smart lighting - Brightness of light is controlled on the basis of day light.

B) Smart thermostats - Allows users to schedule, monitor and remotely


control home temperatures.

C) Smart locks and garage-door openers - Password based or facial recognition


based doors and locks.

D) Smart security cameras – Security cameras that can identify known and
unknown person and raise alarm, in case of security threat.

E) Smart traffic signals – Signal that can monitor vehicles and give responds
according to traffic in real time, controls traffic jam problem

2. Explain in detail about cloud computing.

1) It provides on-demand network access to a shared pool of computing


resources (network, servers, storage, applications) and releases services
with service provider interaction.

Science Q7. Question & Answer Page 3


2) Use of remote servers on the internet to store , manage ,process data rather
than Local server or on your PC

3) There are three primasry service models of cloude computing that are
infrastructure as a service(IaaS),Platform as a Service(PaaS) and Software as
a service(SaaS).

4) There are three basic types of deployment of cloud computing that are
Public,Private and Hybrid.

3.Explain Advantage & Disadvantage of IoT.

Advantages-
1)Efficient resource Utilization-
If we know the functionality and the way that how each device works, we
definitely increase the efficient resource utilization as well as monitor
natural resource.
2)Minimize Human Effort-
As the devices of IoT interact and communicate with each other and do lot of task
for us, then they minimize the human effort.
3)Time Saving-
As it reduces the human effort then it definitely saves out time. Time is the primary
factors in automation which can save through IOT platform.
4)Enhance Data Collection-
IoT devices can collect data from environment like weather, sound, pollution etc.
This data then can be used to take decisions
5)Improve Security-
IoT based security systems can make home or office environment secure

Disadvantages:
1) Privacy : Even without the active participation on the user, the IoT system
provides substantial personal data in maximum detail.
2)Complexity : The designing,developing, maintaining and enabling the large
technology to IoT system is quite complicated.

Science Q7. Question & Answer Page 4


4. Explain models of cloud computing.

1.Infrastructure as a Service:

IaaS gives users access to storage, networking, servers and other computing
resources via the cloud.

Key features :

A)Instead of purchasing hardware users pay on demand.

B) Enterprises saves the costs of buying and maintaining their own.

C) Infrastructure is scalable depending on processing and storage needs.

Examples : Amazon web services, Google Compute Engine (GCE)

2.Platform as a Service:

It offers access to a cloud-based environment in which users can develop,


manage and deliver applications.

Key features :

A) PaaS provides a platform with tools to test, develop and host


applications in the same environment.
B) Allows organizations to focus on development.
C) Manage security, operating systems, server software and backups.
D) Facilitates collaborative work even if teams work remotely.

Ex. Force.com, Google App Engine, Apache Stratos

3.Software as a Service:

It delivers software and applications through the internet , users


accessed these applications through the web.

Key features :

A) Users do not have to manage, install or upgrade software; SaaS providers


manage this.
B) Data is secure in the cloud; equipment failure does not result in loss of data.
C) Use of resources can be scaled depending on service needs.
Science Q7. Question & Answer Page 5
D) Applications are accessible from virtually anywhere in the world.

Examples : Google's G suite, GitHub, SAP, Slack, Dropbox.

5. Explain Type OF cloud computing.

There are three basic types of deployment of cloud computing that are
Public, Private and Hybrid

1)Public Cloud :
In public cloud, all the services and supporting infrastructure are managed off-site
over the internet and shared across multiple users. Public cloud are more efficient
and inexpensive than private and hybrid cloud solutions.
Examples : Amazon AWS, Microsoft Azure, Google Cloud Platform

2)Private cloud :
As the name suggests private cloud provides I.T services through the internet or a
private network to selected users rather than to general public. All the data is
protected behind the firewall. Private cloud solutions are preferred for enhanced
security and privacy by the users.

3)Hybrid Cloud :
Hybrid cloud environments combines both Public and Private cloud elements. The
clouds in a Hybrid environment communicate over an encrypted connection and
allow for the portability of data and applications. Hybrid cloud allows greater
flexibility as compared to that of public and private cloud solutions.

6.Explain Some benefits of Cloud Computing


Benefits of Cloud Computing:
1) Cost saving :Cloud computing solutions are in expensive than the actual
overall Infrastructure set up for the I.T services.
2) Reliable: Cloud computing solutions are more reliable than In-house I.T
infrastructure.
3) Mobility: Cloud computing solutions are more portable because user can
access data anytime,anywhere as required.

7.Give brief idea about AI

i) Artificial Intelligence is the study of making intelligent machine's that can


perform operation like human being.

Science Q7. Question & Answer Page 6


(ii) Al is different from robotics, but related to some extent, in which machines
sense their environment, perform calculations and do physical tasks either by
themselves.

Different fields of AI are as follows:

(iii) Machine learning is the study of computer algorithms that improve


automatically through experience.

(iv) Neural networks imitate the brain's array of interconnected neurons, and relay
information between various units to find connections and derive meaning from
data.

(v) Deep learning utilizes really big neural networks and a lot of computing power
to find complex patterns in data, for applications such image and speech
recognition.

vi) Natuiral language processing involves analyzing and understanding human


language and responding to it.

8.Advantages and Disadvantages of Artificial Intelligence


Advantages-
Reduction in human error : Computers if programmed properly with artificial
Intelligence gives 100% accuracy as compared to task performed by human as
there is always a chance for human mistakes.
Digital Assistance : Some of the highly advanced organizations use digital
assistants to interact with users which saves the need for human resources.
Example- chatbot
Faster Decisions : Using AI alongside other technologies, we can make machines
take decisions faster than a human and carry out actions quicker.
Daily Applications : Daily applications such as Apple’s Siri, Window’s
Cortana, Google’s OK Google are frequently used in our daily routine whether it
is for searching a location, taking a selfie, making a phone call, replying to a mail
and many more.
Disadvantages-
1)High Costs of Creation- As the machines used in AI based environments are
very complex and high in price, it increases the cost for overall set up.
2)Unemployment- As AI is replacing the majority of the repetitive tasks and other
works with robots. This will reduced human interference but cause a major
problems in the employment standards

Science Q7. Question & Answer Page 7


9.Explain the concept of 5G.
1. 5G is the fifth generation of cellular network technology.
2. Digital cellular network:-is service area covered by providers is
divided into small geographical areas called cells.
3. 5G is the next generation of wireless .
4. Carry very large amounts of data at a short distance:- use a variety
of spectrum bands, millimeter wave , radio spectrum. etc
5. The drawback of the higher frequencies : Easily obstructed by the
walls of buildings, trees even changes in the weather.
Features of 5G:-

Q.10)Applications of 5G?

1) Online 5G Games With faster internet speeds comes faster download speeds.
With the speeds that 5G is capable of, gamers will be able to instantly download
titles onto their mobile phones.2)

2)Automated Vehicles - In addition to the 4G capabilities, 5G offers special


features for safety-relevant requirements that no other wireless network can
provide. An automated car would then return the task and responsibility of driving
to the human driver.

3) Virtual Classrooms. An online classroom that allows participants to


communicate with one another, view presentations or videos, interact with other
participants, and engage with resources in work groups.

Science Q7. Question & Answer Page 8


E-Commerce
(Q1)What is E-Commerce?
Answer:-E-Commerce stands for Electronic Commerce.

1. E-Commerce can be broadly defined as the process of buying and selling of


goods or services using an electronic medium such as Internet.
2. E-commerce is also referred as a paperless exchange of business information
using EDI, E-mail, Electronic fund transfer etc.
(Q2) Explain Difference between Traditional Commerce and E-Commerce
Answer:-Traditional Commerce E-commerce
Traditional commerce focuses on E-commerce trading activities are
the ex- change of products and online via the internet and can be
services through considered
personal interactions so it is automatic.
manual.
Traditional commerce is limited to E-commerce is 24X7, it can be
busi- done
ness hours, mostly during the day. anytime day and night.
As far as consumer interactions E-commerce can be termed as
are con- screen to face interaction.
cerned, traditional commerce
provides face to face interaction.
Traditional commerce is limited to E-commerce is global and has no
a physical
particular geographical location. limitation.
Modes of payment in In E-commerce modes of payments
traditional commerce include cash, are bank transfer, credit card, e-
cheques and wallet, mobile
credit cards. payment and many more.
Goods and delivery of services is In E-commerce delivery of goods
instant or
with traditional commerce. services takes some time.
Traditional Commerce’s scope is E-commerce’s scope is global.
local.

(Q3)What are Advantages of E-Commerce ?


Answer:-Global scope: E-commerce provides the sellers with a global reach. Now
sellers and buyers can meet in the virtual world, without barrier of place
(geography).

 Electronic transaction: E-commerce reduces the paper work and


significantly lower the transaction cost. E-Commerce enables the use of

Science Q7. Question & Answer Page 9


credit cards, debit cards, smart cards, electronic fund transfer via bank's
website and other modes of electronic payment.
 Cost Saving: E-commerce application provides users with more options
to compare and select the cheaper and better option.
 Anytime shopping: One other great advantage is the convenience. A
customer can shop 24×7. The website is functional at all times, it does not
have working hours like a shop.
 No intermediaries: Electronic commerce also allows the customer and the
business to be in touch directly, without any intermediaries. This allows for
quick communication and transactions.

 Public services: E-commerce helps the government to deliver


public services such as healthcare, education, social services at a reduced
cost and in an improved manner.
(Q4)What are Disadvantages of E-Commerce?
Setup Cost : The setup of the hardware and the software, the training cost of
employees, the constant maintenance and upkeep are all quite expensive.

 Physical presence: This lack of a personal touch can be a disadvantage for


many types of services and products like interior designing or the jewellery
business.
 Security: Security is another area of concern. Credit card theft, identity theft
etc. remain big concerns with the customers.
 Goods Delivery: There may arrive some problem with fulfillment of order.
Even after the order is placed there can be problems with shipping, delivery,
mix-ups etc. This leaves the customers unhappy and dissatisfied.

(Q5)What are Types of E-Commerce?

 Business - to - Consumer (B2C) : In B2C model, business sells it’s


products directly to a customer. A customer can view the products shown on
the website. The customer can choose a product and order the same. The
website will then send a notification to the business organization via email
and the organization will dispatch the product/ goods to the customer. These
B2C businesses are online retailers. Example : Amazon, Flipkart etc.
 Business - to - Business (B2B) : In B2B model, business sells it’s products
to an intermediate buyer who then sells the product to the final customer. As
an example, a wholesaler places an order from a company's website and
after receiving the consignment, sells the product to the final customer who
comes to buy the product at one of its retail outlets. Example : Tata
communications (network provider).
 Consumer - to - Consumer (C2C) : In C2C model, consumer helps
consumer to sell their assets like residential property, cars, motorcycles etc.,
or rent a room by publishing their information on the website. Website may
Science Q7. Question & Answer Page 10
or may not charge the consumer for its services. Example OLX, Quikr,
online auction.
 Consumer - to - Business (C2B) : In this model, consumers have products
or services of value that can be consumed by businesses. Eg Cashify
(Q6) Explain E-Commerce Trade Cycle?
A trade cycle is the series of exchanges, between a customer and supplier that
take place when a commercial exchange is executed. A general trade cycle
consists of following phases:

 Pre-Sales : It consist of two steps like Search and Negotiate. Customer


search for required website for product to be purchased. In Negotiate step
customer find a supplier who offers good quality product at cheaper price
and then customer agrees the terms forwarded by supplier.
 Execution : This phase consist of Order and Delivery. Customer sends an
order for the selected product and after processing the order, customer
receives delivery of the product.
 Settlement : This phase consist of Invoice (if any) and Payment. Invoice
means customer will receive a bill for purchased product and after
confirmation of received product, customer will pay for the same.
 After-Sales : This phase consists of warranty and After Sale Services. In
warranty period, customer will get all maintenance services for free or at
minimum cost. After sale services means customer will do complaints (if
any) about the performance of product and get maintenance service from the
supplier.

Science Q7. Question & Answer Page 11


(Q7)What are Modes of Payment? Explain.

 Credit Cards : Credit cards are the most common way for customers to pay
online. Merchants can reach out to an international market with credit cards,
by integrating a payment gate- way into their business.
 Mobile Payments : Mobile payments offer a quick solution for customers to
purchase on e-commerce websites. Mobile payments are also commonly
used on donation portals, browser games and social media networks such as
dating sites where customer can pay by scanning a barcode on an app on
mobile. Examples are apps like BHIM, UPI, Paytm, Google Pay,
Paypal,..etc.
 Bank Transfers : Bank transfer is used when money is sent from one bank
account to another. Transferring money from bank account is usually fast
and safer than withdrawing and paying in cash because every transaction
will be authenticated by checking customer’s banking credentials.
Example : NEFT, IMPS etc.
 E-wallets : E-wallet is a type of electronic card which is used for
transactions made online through a computer or a smartphone. E-wallet is a
type of pre-paid account in which a user can store money for any future
online transaction. An E-wallet is protected with a password. Examples are
State Bank Buddy, Paytm Wallets.

8)What are Forms of E-Commerce?

 M-commerce (Mobile commerce) : M-Commerce is the buying and selling


of goods and services through wireless handheld devices such as
smartphones and tablets.
 Social Commerce : Social commerce is a form of electronic commerce that
involves social media, online media that supports social interaction.
Q9) what is E-Commerce Technology?
Electronic commerce draws on technologies such as mobile commerce, electronic
funds transfer, supply chain management, Internet marketing, online transaction
processing, electronic data interchange(EDI), inventory management systems and
automated data collection systems. One of the common E-commerce technology
i.e EDI.

Science Q7. Question & Answer Page 12


Q10) What is Electronic Data Interchange (EDI) ? (MOST IMP Question)

1. EDI is the electronic interchange of business information using a


standardized format.
2. A process which allows one company to send information to another
company electronically rather than on paper.
3. Business entities conducting business electronically are called trading
partners.
4. Many business documents can be exchanged using EDI; two most common
documents are purchase orders and invoices.
5. It is computer-to-computer interchange of strictly formatted documents via
telecommunications or physically transported on electronic storage media.

(Q11)What is E-Governance?

1. It signifies the implementation of information technology in the


government processes and functions so as to cause simple, moral,
accountable and transparent governance.
2. The basic purpose of e-governance is to simplify processes for all, i.e.
government, citizens, businesses etc. at National, State and local levels.
Hence, E-governance delivers SMART government. (S- Simple, M-Moral,
A-Accessible, R-Responsive, T-Transparent Government).

(Q12)What are Advantages of E-governance?

 Reduced corruption
 High transparency
 Increased convenience
 Direct participation of constituents
 Reduction in overall cost.
 Expanded reach of government

(Q13)Explain all Types of E-Governance?
Answer:-E-Governance is of 4 types depending on the specific types of services.
Government-to-Citizen (G2C) :

 The Government-to-citizen refers to the government services which enable


citizens to get access to wide variety of public services.
 Most of the government services fall under G2C.
 It helps the ordinary people to reduce the time and cost to conduct a
transaction.

Science Q7. Question & Answer Page 13


 A citizen can have access to the services anytime from anywhere.
 Furthermore, Many services like license renewals and paying tax are
essential in G2C. It also focuses on geographic land barriers.
Government-to-Business (G2B)

 The Government to business is the exchange of services between


Government and Business organizations.
 G2B provides access to relevant forms needed to comply.
 The G2B also consists of many services exchanged between business sectors
and government.
 It aims at eliminating paper work, saving time, cost and establish
transparency in the business environment, while interacting with
government.
Government-to-Government (G2G)

 The Government-to-Government refers to the interaction between different


government departments, organizations and agencies.
 In G2G, government agencies can share the same database using online
communication.
 The government departments can work together. In conclusion, G2G
services can be at the local level or the international level.
 Likewise, it provides safe and secure inter-relationship between domestic or
foreign government.
Government-to-Employee (G2E)

 The Government-to-Employee is the internal part of G2G sector.


 Furthermore, G2E aims to bring employees together and improvise
knowledge sharing.
 Similarly, G2E provides online facilities to the employees like applying for
leave, reviewing salary payment record and checking the balance of holiday.
 The G2E sector provides human resource training and development.
 So, G2E is also the relationship between employees, government institutions
and their management.
(Q14)What is Encryption?
Encryption is widely used on the internet to protect user information being
sent between a browser and a server.

1. This includes passwords, payment information and other personal


information that should be considered private.
2. The process consists of two processes as encryption and decryption.
3. Encryption converts Plain text (readable form of data) into Cipher Text
(coded form of data) means non-readable form of data.
4. Decryption is exactly opposite process of encryption.
5. It converts Cipher text into Plain text.

Science Q7. Question & Answer Page 14


Encryption is of two types-
1)Symmetric (Private-Key Encryption ) 2) Asymmetric (Public-Key
Encryption )
(Q15)What is Digital Signature?-

1. A digital signature is also known as an electronic signature.


2. A digital signature guarantees the authenticity of an electronic document or
message in digital communication and uses encryption technique
(asymmetric cryptography) which provide proof of original and unmodified
documentation.
3. Digital signatures are used in e-commerce, software distribution, and
financial transactions. This is the direct transfer of information between two
partners.

(Q16)What is Digital Certificate?


1)Digital Certificate is an electronic "password" that allows a person,
organization to exchange data securely over the Internet using the public key
infrastructure(PKI).
2)Digital Certificate is also known as a public key certificate or identity
certificate.
3)In this information is transferred between two authorized partners who have
digital certificates issued by some supreme authority.

Science Q7. Question & Answer Page 15


List: Friends And Hobbies

<!Doctype html>
<html>
<head>
<title>Hobbies</title>
</head>
<body>
<ol>
<li>ABC</li>
<ul type = "circle">
<li> Playing </li>
<li> Reading </li>
</ul>
<li>XYZ</li>
<ul type= "circle">
<li>Swimming</li>
<li>Sketching</li>
</ul>
</ol>
</body>
</html>
List : Language for Speaking And Computer Languages

<!doctype html>
<html>
<head>
<title>
list in HTML
</title>
</head>
<body>
<h1 align="center">Ordered & Unordered list</h1>
<h2>Languages Used For Speaking</h2>
<ol>
<li>English</li>
<li>Hindi</li>
<li>Marathi</li>
</ol>
<h2>Computer Languages</h2>
<ul>
<li>Python</li>
<li>C++</li>
<li>Java</li>
</ul>
</body>
</html>
List- Animal And Flower ( ordered and unordered list)

<!doctype html>
<html>
<head>
<title>
Animal and Flower
</title>
</head>
<body>
<h1 align="center">Animal and Flower</h1>
<h2>Animal</h2>
<ol>
<li>Tiger</li>
<li>lion</li>
<li>Fox</li>
<li>Elephent</li>
<li>Zebra</li>
</ol>
<h2>Flower</h2>
<ul>
<li>Rose</li>
<li>lily</li>
<li>Tulips</li>
<li>Orchids</li>
<li>Amber</li></ul>
</body>
</html>
List –Course And Subject names(Nested list)

<!doctype html>
<html>
<head>
<title>
Subject and Chapter
</title>
</head>
<body>
<h1 align="center">Subject and Chapter</h1>
<h2>Courses and Subjects</h2>
<ul>
<li>BA</li>
<ol>
<li>Philosophy</li>
<li>Economics</li>
<li>Literature</li>
<li>Psychology</li>
<li>Sociology</li>
</ol>
<li>BCom</li>
<ol>
<li>Accounting</li>
<li>Finance</li>
<li>Economics</li>
<li>Business Management</li>
<li>Marketing</li>
<li>Entrepreneurship</li>
</ol>

<li>B.Sc</li>
<ol>
<li>Physics </li>
<li>Chemistry</li>
<li>Biology</li>
<li>Maths </li>
</ol>
</ul>
</body>
</html>
List : Flower And Fruit( Ordered and Unordered List)

<!doctype html>
<html>
<head>
<title>
Flower and Fruits
</title>
</head>
<body>
<h1 align="center">Flower and Fruits</h1>
<h2>Flowers</h2>
<ol>
<li>Rose</li>
<li>lily</li>
<li>Tulips</li>
<li>Orchids</li>
<li>Amber</li>
</ol>
<h2>Fruits</h2>
<ul>
<li>Apple</li>
<li>Grapes</li>
<li>Mango</li>
<li>Strawberry</li>
<li>Blueberry</li>
</ul>
</body>
</html>
List : Student And Subject (unordered and ordered list)

<!doctype html>
<html>
<head>
<title>
Student and Subject
</title>
</head>
<body>
<h1 align="center">Student and Subject </h1>
<h2>Student</h2>
<ul>
<li>Atharv</li>
<li>Prasad</li>
<li>Vijay</li>
<li>Raj</li>
<li>Soham</li>
</ul>
<h2>Subject</h2>
<ol>
<li>Marathi</li>
<li>Hindi</li>
<li>English</li>
<li>Maths</li>
<li>Science</li>
</ol>
</body>
</html>
List- Subject and Topics(Nested list)

<!doctype html>
<html>
<head>
<title>
Subject and Chapter
</title>
</head>
<body>
<h1 align="center">Subject and Chapter</h1>
<h2>Subject</h2>
<ul>
<li>IT</li>
<ol>
<li>Web Designing</li>
<li>SEO</li>
<li>Javascript</li>
<li>Emerging Technology</li>
<li>E-Commerce</li>
</ol>
<li>Physics</li>
<ol>
<li>Electrostatics</li>
<li>Current Electricity</li>
<li>Optics</li>
</ol>

<li>Chemistry</li>
<ol>
<li>Solutions </li>
<li>Electrochemistry</li>
<li>Chemical Kinetics</li>
<li>Biomolecules </li>
</ol>
</ul>
</body>
</html>
External CSS

<!doctype html>

<html>

<head>

<title>

External CSS

</title>

<link rel="stylesheet" type="text/css" href="style.css">

</head>

<body>

<h1 align="center">External CSS</h1>

<b>Like my web page</b>

</body>

</html>
Internal Css:

<!doctype html>

<html>

<head>

<title>

Internal CSS

</title>

<style>

h1{border-style:dotted}

body{background-color:skyblue}

</style>

</head>

<body>

<h1 align="center">Internal CSS</h1>

</body>

</html>
1. Write a html program to accept Name of the College, Total number of students in the
college, Total number of halls (range till 100). The data should be sent to the server.

<!doctype html>
<html>
<head>
<title> College Data </title>
</head>
<body>
<h1> College Information Form</h1>
<form name="Clgform" method="post" action="process.php">
Name of the College :
<input type="text" name="clg_name">
<br> <br>
Total No. of Students :
<input type="number" name="stud_no" min=1>
<br> <br>
Total No. of Halls :
<input type="range" name="hall_no" min=1 max=100>
<br> <br>
<input type="submit" value="SUBMIT">
input type="reset" value="RESET">
</form>
</body>
</html>
2. Write a html program to accept Name of the Employee (cannot be blank), Email Id of
the Employee, Salary (maximum 50000). The data should be sent to the server.

<!doctype html>
<html>
<head>
<title> Employee Data </title>
</head>
<body>
<h1> Employee Information Form</h1>
<form name="empform" method="post" action="process.php">
Name of the Employee :
<input type="text" name="emp_name" REQUIRED>
<br> <br>
Email ID :
<input type="email" name="emp_email" min=1>
<br> <br>
Salary :
<input type="number" name="emp_sal" min=1 max=50000>
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
3. Write a html program to create a form to accept Doctor's name, number of patients
(maximum 20), Date of examining patients

<!doctype html>
<html>
<head>
<title> Hospital Data </title>
</head>
<body>
<h1> Doctor Information Form</h1>
<form name="docform" method="post" action="process.php">
Name of the Doctor :
<input type="text" name="doc_name" REQUIRED>
<br> <br>
No. of Patients :
<input type="number" name="patient_no" min=1 max=20>
<br> <br>
Date of Examination :
<input type="date" name="ex_date">
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
4. Write a html program to create a form to accept Patient's name, his mobile number
and date of birth. Keep all fields compulsory.

<!doctype html>
<html>
<head>
<title> Hospital Data </title>
</head>
<body>
<h1> Patient Information Form</h1>
<form name="docform" method="post" action="process.php">
Name of the Patient :
<input type="text" name="pat_name" REQUIRED>
<br> <br>
Mobile No. :
<input type="number" name="pat_mobile" REQUIRED>
<br> <br>
Date of Birth :
<input type="date" name="pat_date" REQUIRED>
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
5. Write a html program to create a form to accept student's name, number of practicals
he has completed and provide facility to upload his completion certificate.

<!doctype html>
<html>
<head>
<title> Student Data </title>
</head>
<body>
<h1> Student Practical Information Form</h1>
<form name="studform" method="post" action="process.php">
Name of the Student :
<input type="text" name="stud_name" REQUIRED>
<br> <br>
No. of Practicals Completed :
<input type="number" name="practical_no" min=1>
<br> <br>
Upload Completion Certificate :
<input type="file" name="certificate">
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
6. Write a html program to create a form to accept students roll no (in number format),
Unit test marks (maximum 25 marks), Terminal exam marks (maximum 50 marks).
Include the name of the Subject teacher and send the data to the server.

<!doctype html>
<html>
<head>
<title> Student Data </title>
</head>
<body>
<h1> Student Exam Marks Form</h1>
<form name="studform" method="post" action="process.php">
Student Roll No :
<input type="number" name="stud_roll" min=1>
<br> <br>
Unit Test Marks :
<input type="number" name="unit_test" min=0 max=25>
<br> <br>
Terminal Exam Marks :
<input type="number" name="unit_test" min=0 max=50>
<br> <br>
Name of the Subject Teacher :
<input type="text" name="sub_teacher">
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
7. Write a html program to create registration form to accept name, mobile no., date of
birth. The form should have register caption in the button to submit the data.

<!doctype html>
<html>
<head>
<title> User Data </title>
</head>
<body>
<h1> User Registration Form</h1>
<form name="userform" method="post" action="process.php">
Name of the User :
<input type="text" name="user_name">
<br> <br>
Mobile No. :
<input type="number" name="user_mobile">
<br> <br>
Date of Birth :
<input type="date" name="user_dob">
<br> <br>
<input type="submit" value="REGISTER">
<input type="reset" value="RESET">
</form>
</body>
</html>
8. Write html program to accept Name of the hospital, Email Id of the hospital, Number of
beds in the hospital. The data should be sent to the server.

<!doctype html>
<html>
<head>
<title> Hospital Data </title>
</head>
<body>
<h1> Hospital Information Form</h1>
<form name="hospitalform" method="post" action="process.php">
Name of the Hospital :
<input type="text" name="hosp_name">
<br> <br>
Email Id. :
<input type="email" name="hosp_email">
<br> <br>
Number of beds in Hospital :
<input type="number" name="hosp_beds">
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
9.A. Write html program to create a form to accept students roll no (in number format),
Unit test marks(maximum 25 marks), Terminal exam marks (maximum 50 marks).
Include the name of the Subject teacher and send the data to the server.

<!doctype html>
<html>
<head>
<title> Student Data </title>
</head>
<body>
<h1> Student Exam Marks Form</h1>
<form name="studform" method="post" action="process.php">
Student Roll No :
<input type="number" name="stud_roll" min=1>
<br> <br>
Unit Test Marks :
<input type="number" name="unit_test" min=0 max=25>
<br> <br>
Terminal Exam Marks :
<input type="number" name="unit_test" min=0 max=50>
<br> <br>
Name of the Subject Teacher :
<input type="text" name="sub_teacher">
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
9.B. Write html program to accept student name, Date of birth and attendance
percentage in number format. Send the data to the server.

<!doctype html>
<html>
<head>
<title> Student Data </title>
</head>
<body>
<h1> Student Attendance Percentage </h1>
<form name="studform" method="post" action="process.php">
Student Name :
<input type="text" name="stud_name">
<br> <br>
Date of Birth:
input type="date" name="stud_dob">
<br> <br>
Attendance Percentage :
<input type="number" name="stud_attd" min=0 max=100>
<br> <br>
<input type="submit" value="SUBMIT">
input type="reset" value="RESET">
</form>
</body>
</html>
10. Write a html program to display "Digital India" in Verdana font using internal CSS.
Add any two sentences about Digital India below in orange color.

<!doctype html>
<html>
<head>
<title> Digital India </title>
<style>
h1 { font-family : "Verdana"; }
p { color : orange; }
</style>
</head>
<body>
<h1> Digital India</h1>
<p> Digital India
</p>

<p> It making the country digitally empowered in the field of technology. </p>
</body>
</html>
11. Write a html program to display "Maharashtra State Board" in blue color and font
size 30 pixels using internal CSS. Give background colour yellow for the web page.

<!doctype html>
<html>
<head>
<title> MS Board </title>
<style>
body { background-color : yellow; }
p{
color : blue;
font-size ; 30px;
}
</style>
</head>
<body>
<p> Maharashtra State Board</p>
</body>
</html>
12. Write a html program to display "Maharashtra State Board" in font size 40 pixels
using internal CSS. Give background colour yellow for the same text.

<!doctype html>
<html>
<head>
<title> MS Board </title>
<style>
body { background-color : yellow; }
p { font-size ; 40px; }
</style>
</head>
<body>
<p> Maharashtra State Board</p>
</body>
</html>
13. Write a html program to display "Web designing" in italic format and having
underline using internal CSS. Add any two sentences about web designing in green color.

<!doctype html>
<html>
<head>
<title> Web Designing </title>
<style>
h1 {
font-style : italic;
text-decoraton : underline;
}
p { color : green; }
</style>
</head>
<body>
<h1> Web Designing</h1>
<p> Web designing is the art of planning and arranging content on a website so
that it can be shared and accessed online with the world. </p>
<p> Web design encompasses many different skills and disciplines in the
production and maintenance of websites. </p>
</body>
</html>
14. Write a html program to insert inline frame on web page. Use xyz html file as a source
for inline frame. Size of inline frame should be 100x100 pixels.

<!doctype html>
<html>
<head>
<title> Inline Frame example </title>
</head>
<body>
<h1> Inline Frame</h1>
<iframe src="xyz.html" height=100 width=100>
</body>
</html>
15. Write html program to insert inline frame on web page. Use xyz html file as a source
for inline frame. Size of inline frame should be 300 x 300 pixels.

<!doctype html>
<html>
<head>
<title> Inline Frame example </title>
</head>
<body>
<h1> Inline Frame</h1>
<iframe src="xyz.html" height=300 width=300>
</body>
</html>
16. Write html program to create an ordered list of 3 languages used for speaking and
unordered list having 2 computer languages.

<!doctype html>
<html>
<head>
<title> Languages </title>
</head>
<body>
<h2> Languages used for Speaking</h2>
<OL>
<LI> English </LI>
<LI> Hindi </LI>
<LI> Marathi </LI>
</OL>
<h2> Computer Languages</h2>
<UL>
<LI> Java </LI>
<LI> Python </LI>
</UL>
</body>
</html>
17. Write html program to display names of two friends in ordered list and also display
their hobbies under their name in unordered list.

<!doctype html>
<html>
<head>
<title> Friends and their Hobbies </title>
</head>
<body>
<h2> Friends and their Hobbies</h2>
<OL>
<LI> Vedika </LI>
<UL>
<LI> Singing </LI>
<LI> Dance </LI>
</UL>
<LI> Riya </LI>
<UL>
<LI> Reading Books </LI>
<LI> Travelling to Historical Places </LI>
</UL>
</OL>

</body>
</html>
18. Write html program to create an unordered list having names of two students. Add
ordered list of subjects they selected:

<!doctype html>
<html>
<head>
<title> Students subjects</title>
</head>
<body>
<h2> Student List with subjects</h2>
<UL>
<LI> Sanika</LI>
<OL>
<LI> IT</LI>
<LI> Maths</LI>
</OL>
<LI> Sachin</LI>
<OL>
<LI> English </LI>
<LI> PT </LI>
</OL>
</UL>

</body>
</html>
Write JavaScript code to print subtraction of 2 numbers.
1.
2 .Write JavaScript code to print addition of 2 numbers.

3 .Write JavaScript code to print multiplication of 2 numbers.

4 .Write JavaScript code to print division of 2 numbers.

5 .Write JavaScript code to print addition, subtraction, multiplication & division of 2 numbers.

6 .Write JavaScript code to display area of circle, accept value from user.

7 .Write JavaScript code to print area of triangle.

8 .Write JavaScript code to calculate the average of three numbers.

9 .Write JavaScript code to print perimeter of rectangle.

10 .Write JavaScript code to print perimeter of trapezium.

11 .Write JavaScript code to check whether the number is odd or even.

12 Write JavaScript code to enter two values and display the largest.

13 .Write JavaScript code to print multiplication table of 3.

14 .Write JavaScript code to print numbers from 1 to 10.

15 .Write JavaScript code to print sum of 50 natural numbers.

16 .Write JavaScript code to print all even numbers from 10 to 50.

17 .Write JavaScript code when user click on button, it will display sum of even numbers from 1
to 10.
18 .Write JavaScript code to print all odd numbers from 50 to 100.

19 .Write JavaScript code to print factorial of given no( 7 seven) on button click.

20 .Write JavaScript code to print square of a accepted number.

21 .Write JavaScript code to count length of accepted string after click on the button.

22 .Write JavaScript code to accept two dates and find the difference in those dates.

23 .Write JavaScript code to take a input of string and reverse the string in output.

24 Write JavaScript code to print factorial of accepted number.

25 Write JavaScript code to take a input of number and calculate cube of number.

26 Write a javascript code to display if accepted no. is prime no. or not.


JAVA SCRIPT Programs with solutions

1.Write JavaScript code to print subtraction of 2 numbers.

<! DOCTYPE html>

<html>

<head>

<title>JS program to subtract two numbers</title>

</head>

<body>

<script>

var n1, n2, diff;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

diff=n2-n1;

alert("Subtraction - " + diff);

</script>

</body>

</html>
2.Write JavaScript code to print addition of 2 numbers.
<! DOCTYPE html>

<html>

<head>

<title>JS program to add two numbers</title>

</head><body>

<script>

var n1, n2, sum;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

sum=n1+n2;

alert("Sum- " + sum);

</script>

</body>

</html>
3.Write JavaScript code to print multiplication of 2 numbers.

<! DOCTYPE html>

<html><head>

<title>JS program to multiply two numbers</title>

</head>

<body>

<script>

var n1, n2, prod;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

prod=n1*n2;

alert("Multiplication - " + prod);

</script>

</body>

</html>
4.Write JavaScript code to print division of 2 numbers.
<! DOCTYPE html>

<html>

<head>

<title>JS program to divide two numbers</title>

</head>

<body>

<script>

var n1, n2, q;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

q=n1/n2;

alert("Division - " + q);

</script></body></html>
5.Write JavaScript code to print addition, subtraction,
multiplication & division of 2 numbers.
<! DOCTYPE html>

<html>

<head>

<title>JS program to add, subtract, multiply, divide two numbers</title>

</head>

<body>

<script>

var n1, n2, s,d,m,q;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

s=n1+n2;

d=n2-n1;

m=n1*n2;

q=n1/n2;

document.write("<br>Sum - " + s);

document.write("<br>Difference - " + d);

document.write("<br>Product - " + m);

document.write("<br>Division - " + q);

</script>

</body>

</html>
6.Write JavaScript code to display area of circle, accept value from
user.

<!Doctype html>

<html>

<body>

<form name="f1">

Enter Radius:

<input type="number" name="n1"><br><br>

<input type="button" name="b1" value="Area of circle" onClick="area()">

</form>

</body>

<script type="text/javascript">

function area()

var b,h,a;

r=parseInt(f1.n1.value);

a=3.14*r*r;

alert("Area of circle is "+a);

</script>

</html>
7. Write JavaScript code to print area of triangle.
<Doctype html>

<html>

<body>

<form name="f1">

Enter Base

<input type="number" name="n1"><br><br>

Enter Hieght

<input type="number" name="n2"><br><br>

<input type="button" name="b1" value="Area of Triangle" onClick="area()">

</form>

</body>

<script type="text/javascript">

function area()

var b,h,a;

b=parseInt(f1.n1.value);

h=parseInt(f1.n2.value);

a=1/2*b*h;

alert("Area of Triangle is "+a);

</script>

</html>
8.Write JavaScript code to calculate the average of three numbers.
<! DOCTYPE html>

<html>

<head>

<title>JS program to calculate average of three numbers</title>

</head>

<script>

var n1, n2, n3, avg;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

n3=parseInt(prompt("Enter third number:"));

avg=(n1+n2+n3)/3;

alert("Average = " + avg);

</script></html>
9.Write JavaScript code to print perimeter of rectangle.
<! DOCTYPE html>

<html>

<head>

<title>JS program to calculate perimeter of rectangle</title>

</head>

<body>

<script>

var length, breadth, p;

length=parseInt(prompt("Enter length of the rectangle:"));

breadth=parseInt(prompt("Enter breadth of the rectangle:"));

p=2*(length+breadth);

alert("Perimeter- " + p);

</script>

</body>

</html>
10.Write JavaScript code to print perimeter of trapezium.
<! DOCTYPE html>

<html>

<head>

<title>JS program to calculate perimeter of trapezium</title>

</head>

<body><script>var a, b, c, d, p;

a=parseInt(prompt("Enter length of the first side of trapezium:"));

b=parseInt(prompt("Enter length of the second side of trapezium:"));

c=parseInt(prompt("Enter length of the third side of trapezium:"));

d=parseInt(prompt("Enter length of the fourth side of trapezium:"));

p=a+b+c+d;

alert("Perimeter - " + p);

</script>

</body>

</html>
11.Write JavaScript code to check whether the number is odd or
even.
<! DOCTYPE html>

<html>

<head>

<title>JS program to check number is odd or even</title>

</head>

<body>

<script>

var n;

n=parseInt(prompt("Enter a number:"));

if(n%2==0)

alert("Number is even");

else

alert("Number is odd");

</script></body></html>
12. Write JavaScript code to enter two values and display the
largest.
<! DOCTYPE html>

<html>

<head>

<title>JS program to find largest number</title>

</head>

<body>

<script>

var n1, n2;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

if(n1>n2)

alert("Larger number - " + n1);

else

alert("Larger number - " + n2);

</script></body></html>
13. Write JavaScript code to print multiplication table of 3.
<! DOCTYPE html>

<html>

<head>

<title>JS program to print multiplication table of 3</title>

</head>

<body>

<script>

var n=3, i;

document.write("Multiplication table of 3");

for(i=1;i<=10;i++)

document.write("<br>"+n+" * "+i+" = "+n*i);

</script></body></html>
14. Write JavaScript code to print numbers from 1 to 10.
<! DOCTYPE html>

<html>

<head>

<title>JS program to print numbers from 1 to 10</title>

</head>

<body><script>

var i;

document.write("Numbers from 1 to 10");

for(i=1;i<=10;i++)

document.write("<br>"+i);

</script>

</body></html>
15. Write JavaScript code to print sum of 50 natural numbers.
<! DOCTYPE html>

<html>

<head>

<title>JS program to print sum of 50 natural numbers.</title>

</head>

<body>

<script>

var i, sum=0;

document.write("Sum of numbers from 1 to 50");

for(i=1;i<=50;i++)

{ document.write("<br>"+i);

sum=sum+i;

document.write("<br>Sum - "+sum);

</script>

</body></html>
16. Write JavaScript code to print all even numbers from 10 to 50.
<! DOCTYPE html>

<html>

<head>

<title>JS program to print even numbers from 10 to 50</title>

</head>

<body><script>

var i;

document.write("Even Numbers from 10 to 50");

for(i=10;i<=50;i++)

if(i%2==0)

document.write("<br>"+i);

</script></body></html>
17. Write JavaScript code when user click on button, it will display
sum of even numbers from 1 to 10.
<! DOCTYPE html>

<html>

<head>

<title>JS program to print sum of even numbers.</title>

<script>

function display_sum() {

var i, sum=0;

for(i=1;i<=10;i++)

if(i%2==0)

sum=sum+i;

alert("Sum of even numbers upto 10="+sum);

</script></head>

<body>

<input type="button" name="disp_sum" value="Display Sum"


onclick="display_sum()">

<br><p id="disp"></p>

</body></html>
18.Write JavaScript code to print all odd numbers from 50 to 100.
<! DOCTYPE html>

<html>

<head>

<title>JS program </title>

</head>

<body>

<h1>JS program to print odd numbers from 50 to 100</h1>

<script>

var i;

document.write("Odd Numbers from 50 to 100");

for(i=50;i<=100;i++)

{ if(i%2!=0)

document.write("<br>"+i);

}</script></body></html>
19.Write JavaScript code to print factorial of given no.(7 seve) on
button click.
<! DOCTYPE html>

<html>

<head>

<title>JS program - factorial of number</title>

<script>

function display_factorial(num) {

var i, f = 1;

for (i = num; i >= 1; i--)

{ f=f*i;

document.getElementById("disp").innerHTML = "Factorial of 7 - " + f;

</script></head>

<body>

<h1>JS program to print factorial of number</h1>

<input type="button" name="disp_fact" value="Display Factorial"


onclick="display_factorial(7)">

<br><p id="disp"></p>

</body></html>
20.Write JavaScript code to print square of a accepted number.
<! DOCTYPE html>

<html>

<head>

<title>JS program to display square of a number</title>

</head>

<body>

<script>

var n, r;

n=parseInt(prompt("Enter a number:"));

r=n*n

alert("Square - " + r);

</script>

</body>

</html>
21.Write JavaScript code to count length of accepted string after click on the
button.

<! DOCTYPE html>

<html>

<head>

<title>JS program</title>

<script>

function display_length() {

var str, len;

str = form1.str_box.value;

len = str.length;

document.getElementById("disp").innerHTML = "Length of String - " + len;

</script>

</head>

<body>

<h1>JS program to print length of string</h1>

<form name="form1">

<input type="text" name="str_box" size=50>

<input type="button" name="disp_strlen" value="Display Length"


onclick="display_length()">

</form><br>

<p id="disp"></p>

</body></html>
22.Write JavaScript code to accept two dates and find the difference
in those dates.
<!doctype html>
<html><head><title>JS program</title>

<script>

function display_diff() {

var d1, d2, diff;

d1 = new Date(form1.date1.value);

d2 = new Date(form1.date2.value);

diff = (d2 - d1) / (1000 * 3600 * 24);

document.getElementById("disp").innerHTML = "Difference of dates in days - "


+ diff;

</script></head><body>

<h1>JS program to display difference between dates</h1>

<form name="form1">

<input type="date" name="date1"><br><br>

<input type="date" name="date2"><br><br>

<input type="button" name="disp_diff" value="Display Difference"


onclick="display_diff()">

</form><br>

<p id="disp"></p>

</body>

</html>
23.Write JavaScript code to take a input of string and reverse the
string in output.
<html>

<head>

<title>JS program - reverse of string</title>

<script>

function display_reverse(str) {

var newstr;

newstr = str.split("").reverse().join("");

document.write("Reverse of String - " + newstr);

</script>

</head>

<body>

<h1>JS program to reverse a string</h1>

<script>

var s;

s = prompt("Input a string");

display_reverse(s);

</script></body></html>
24. Write JavaScript code to print factorial of accepted number.

<!Doctype html>

<html>

<body>

<form name="f1">

Enter Number :<input type="number" name=n1><br><br>

<input type="button" name="b1" value="Factorial" onclick="fact()">

</form>

</body>

<script type="text/javascript">

function fact()

var a, f=1,i;

a=parseInt(f1.n1.value);

for(i=a;i>=1;i--)

f=f*i;

alert("Factorial of a Number is "+f);

</script>

</html>
25.Write JavaScript code to take a input of number and calculate
cube of number.

<!doctype html>

<html>

<body>

<form name="f1">

Enter a Number

<input type="number" name="n1"><br><br>

<input type="button" name="b1" value="cube" onmousemove="chk()">

</form>

</body>

<script type="text/javascript">

function chk()

var n,c;

n=parseInt(f1.n1.value);

c=n*n*n;

alert("Cube of a Number is "+c);

</script>

</html>
26.Write a javascript code to display if accepted no. is prime no. or not.

<!doctype html>

<html><body>

<form name="f1">

Enter a Number

<input type="number" name="n1"><br><br>

<input type="button" name="b1" value="check Prime" onclick="pr()">

</form></body>

<script type="text/javascript">

function pr()

var a,p=1,i;

a=parseInt(f1.n1.value);

for(i=2;i<a;i++)

if(a%i==0)

p=0;

if(p==1)

alert("Number is Prime Number");

else

alert("Number is not a Prime Number");

</script>

</html>
2. SEO
Q.1)What is SEO?

1. SEO stands for Search Engine Optimization.


2. SEO is a technique used for designing and developing a website be to
rank high in search engine results.
3. It is a subset of search engine marketing.

Q.2) Explain Types of SEO?


There are two types of optimization

 On-Page SEO : It includes Provision of good content, good keywords


selection, putting keywords on correct places, giving appropriate title to
every page etc.
 Off-Page SEO : It includes link building, increasing link popularity by
submitting open directories, search engines, link exchange etc.

(Q3)Explain Techniques of SEO?


Answer:-These are classified into two broad categories:

 White Hat SEO : Techniques that search engines recommends as apart of


good design.
 Black Hat SEO : Techniques that search engines do not approve. The
techniques used for optimizing the website are manipulative.

Q4)What are SEO Keywords?


SEO keywords are the important words and phrases related to the developed
website content for ranking.

1. A list of keywords should need to be carefully choosen to optimize the


search.
2. Keyword Research and Analysis is an important part of the Search Engine
Optimization (SEO) as well as"Search Engine Marketing"
3. There are various online Keyword Planner tools (such as Google Add Words
keyword planner) to shortlist keyword.

Q5)What are SEO-Backlinks?

1. Backlinks are links on one website that, when clicked, take the user to
another site.
2. Backlinks are especially valuable for SEO because they contribute to the
overall strength and value of the content.
3. They also represent a "vote of confidence" from one site to another.

Science Q7. Question & Answer Page 1


4. In short, backlinks to your website are a signal to search engines that
others are interested to know about the contents form your website.

(Q6)List down all the factors which are required for Optimizing Website?

1. SEO : Page structure optimization


2. SEO Keywords
3. SEO Social Bookmarking
4. SEO-Social Media Optimization (SMO)
5. SEO-Backlinks
6. Speed of the website
7. Mobile friendly.

Q7)Explain Page Structure Optimization?

1. Html programs should start with <!doctype html>


2. If it is singular tag eg.<img> it should be self enclosed like this <img />
3. Order of tag should be proper.
4. Most of the time recently opned tag will be closed first.
5. While creating a web page,Metadescription should be used to boost your
ON-page SEO.
6. The pages should include proper heading tags from <h1> to <h6> wherever
required.

Q8)What is SEO Audit?


An SEO Audit helps to find out what could be done to improve ranking on
search engines, so that consumers could find the website with greater
ease. It analyses the websites health.Eg-Seomator, SEOptimer are few free
SEO audit tools available on net.
SEOptimer is a free SEO Audit Tool that will perform a detailed SEO Analysis.
It provides clear and actionable recommendations that can be taken to
improve your online presence.
Q9)Explain White Hat Techniques
WhiteHatSEO:Techniques that search engines recommends as apartof
good design.
 Relevantcontent
 Well-labeledimages
 Relevantlinksandrefernces
 Completesentenceswithgoodspellingand grammar
 Standard-compliantHTML
 Uniqueandrelevantpagetitles

Science Q7. Question & Answer Page 2


Q10) Explain Black Hat Techniques
 Duplicatecontent
 Invisibletextandstuffedkeyword
 Clokingorre-directingtheusertoanother site orpage
 Linksfromsiteswithnon-relveantcontent

Q11)Explain SEO Social Bookmarking?

1. Social Bookmarking is a powerful tool in promoting a website.


2. It is very useful for off-page SEO optimization.
3. Bookmarks are website links that are stored for future references.
4. Bookmarking service aloows you to save, organize and share bookmarks
with other users.
5. With social bookmarking,you can quickly create high quality backlinks.

4. Emerging Tech(IOT)
1.Define IoT with Example?

1.Give some applications of IOT.

A) Smart lighting - Brightness of light is controlled on the basis of day light.

B) Smart thermostats - Allows users to schedule, monitor and remotely


control home temperatures.

C) Smart locks and garage-door openers - Password based or facial recognition


based doors and locks.

D) Smart security cameras – Security cameras that can identify known and
unknown person and raise alarm, in case of security threat.

E) Smart traffic signals – Signal that can monitor vehicles and give responds
according to traffic in real time, controls traffic jam problem

2. Explain in detail about cloud computing.

1) It provides on-demand network access to a shared pool of computing


resources (network, servers, storage, applications) and releases services
with service provider interaction.

Science Q7. Question & Answer Page 3


2) Use of remote servers on the internet to store , manage ,process data rather
than Local server or on your PC

3) There are three primasry service models of cloude computing that are
infrastructure as a service(IaaS),Platform as a Service(PaaS) and Software as
a service(SaaS).

4) There are three basic types of deployment of cloud computing that are
Public,Private and Hybrid.

3.Explain Advantage & Disadvantage of IoT.

Advantages-
1)Efficient resource Utilization-
If we know the functionality and the way that how each device works, we
definitely increase the efficient resource utilization as well as monitor
natural resource.
2)Minimize Human Effort-
As the devices of IoT interact and communicate with each other and do lot of task
for us, then they minimize the human effort.
3)Time Saving-
As it reduces the human effort then it definitely saves out time. Time is the primary
factors in automation which can save through IOT platform.
4)Enhance Data Collection-
IoT devices can collect data from environment like weather, sound, pollution etc.
This data then can be used to take decisions
5)Improve Security-
IoT based security systems can make home or office environment secure

Disadvantages:
1) Privacy : Even without the active participation on the user, the IoT system
provides substantial personal data in maximum detail.
2)Complexity : The designing,developing, maintaining and enabling the large
technology to IoT system is quite complicated.

Science Q7. Question & Answer Page 4


4. Explain models of cloud computing.

1.Infrastructure as a Service:

IaaS gives users access to storage, networking, servers and other computing
resources via the cloud.

Key features :

A)Instead of purchasing hardware users pay on demand.

B) Enterprises saves the costs of buying and maintaining their own.

C) Infrastructure is scalable depending on processing and storage needs.

Examples : Amazon web services, Google Compute Engine (GCE)

2.Platform as a Service:

It offers access to a cloud-based environment in which users can develop,


manage and deliver applications.

Key features :

A) PaaS provides a platform with tools to test, develop and host


applications in the same environment.
B) Allows organizations to focus on development.
C) Manage security, operating systems, server software and backups.
D) Facilitates collaborative work even if teams work remotely.

Ex. Force.com, Google App Engine, Apache Stratos

3.Software as a Service:

It delivers software and applications through the internet , users


accessed these applications through the web.

Key features :

A) Users do not have to manage, install or upgrade software; SaaS providers


manage this.
B) Data is secure in the cloud; equipment failure does not result in loss of data.
C) Use of resources can be scaled depending on service needs.
Science Q7. Question & Answer Page 5
D) Applications are accessible from virtually anywhere in the world.

Examples : Google's G suite, GitHub, SAP, Slack, Dropbox.

5. Explain Type OF cloud computing.

There are three basic types of deployment of cloud computing that are
Public, Private and Hybrid

1)Public Cloud :
In public cloud, all the services and supporting infrastructure are managed off-site
over the internet and shared across multiple users. Public cloud are more efficient
and inexpensive than private and hybrid cloud solutions.
Examples : Amazon AWS, Microsoft Azure, Google Cloud Platform

2)Private cloud :
As the name suggests private cloud provides I.T services through the internet or a
private network to selected users rather than to general public. All the data is
protected behind the firewall. Private cloud solutions are preferred for enhanced
security and privacy by the users.

3)Hybrid Cloud :
Hybrid cloud environments combines both Public and Private cloud elements. The
clouds in a Hybrid environment communicate over an encrypted connection and
allow for the portability of data and applications. Hybrid cloud allows greater
flexibility as compared to that of public and private cloud solutions.

6.Explain Some benefits of Cloud Computing


Benefits of Cloud Computing:
1) Cost saving :Cloud computing solutions are in expensive than the actual
overall Infrastructure set up for the I.T services.
2) Reliable: Cloud computing solutions are more reliable than In-house I.T
infrastructure.
3) Mobility: Cloud computing solutions are more portable because user can
access data anytime,anywhere as required.

7.Give brief idea about AI

i) Artificial Intelligence is the study of making intelligent machine's that can


perform operation like human being.

Science Q7. Question & Answer Page 6


(ii) Al is different from robotics, but related to some extent, in which machines
sense their environment, perform calculations and do physical tasks either by
themselves.

Different fields of AI are as follows:

(iii) Machine learning is the study of computer algorithms that improve


automatically through experience.

(iv) Neural networks imitate the brain's array of interconnected neurons, and relay
information between various units to find connections and derive meaning from
data.

(v) Deep learning utilizes really big neural networks and a lot of computing power
to find complex patterns in data, for applications such image and speech
recognition.

vi) Natuiral language processing involves analyzing and understanding human


language and responding to it.

8.Advantages and Disadvantages of Artificial Intelligence


Advantages-
Reduction in human error : Computers if programmed properly with artificial
Intelligence gives 100% accuracy as compared to task performed by human as
there is always a chance for human mistakes.
Digital Assistance : Some of the highly advanced organizations use digital
assistants to interact with users which saves the need for human resources.
Example- chatbot
Faster Decisions : Using AI alongside other technologies, we can make machines
take decisions faster than a human and carry out actions quicker.
Daily Applications : Daily applications such as Apple’s Siri, Window’s
Cortana, Google’s OK Google are frequently used in our daily routine whether it
is for searching a location, taking a selfie, making a phone call, replying to a mail
and many more.
Disadvantages-
1)High Costs of Creation- As the machines used in AI based environments are
very complex and high in price, it increases the cost for overall set up.
2)Unemployment- As AI is replacing the majority of the repetitive tasks and other
works with robots. This will reduced human interference but cause a major
problems in the employment standards

Science Q7. Question & Answer Page 7


9.Explain the concept of 5G.
1. 5G is the fifth generation of cellular network technology.
2. Digital cellular network:-is service area covered by providers is
divided into small geographical areas called cells.
3. 5G is the next generation of wireless .
4. Carry very large amounts of data at a short distance:- use a variety
of spectrum bands, millimeter wave , radio spectrum. etc
5. The drawback of the higher frequencies : Easily obstructed by the
walls of buildings, trees even changes in the weather.
Features of 5G:-

Q.10)Applications of 5G?

1) Online 5G Games With faster internet speeds comes faster download speeds.
With the speeds that 5G is capable of, gamers will be able to instantly download
titles onto their mobile phones.2)

2)Automated Vehicles - In addition to the 4G capabilities, 5G offers special


features for safety-relevant requirements that no other wireless network can
provide. An automated car would then return the task and responsibility of driving
to the human driver.

3) Virtual Classrooms. An online classroom that allows participants to


communicate with one another, view presentations or videos, interact with other
participants, and engage with resources in work groups.

Science Q7. Question & Answer Page 8


E-Commerce
(Q1)What is E-Commerce?
Answer:-E-Commerce stands for Electronic Commerce.

1. E-Commerce can be broadly defined as the process of buying and selling of


goods or services using an electronic medium such as Internet.
2. E-commerce is also referred as a paperless exchange of business information
using EDI, E-mail, Electronic fund transfer etc.
(Q2) Explain Difference between Traditional Commerce and E-Commerce
Answer:-Traditional Commerce E-commerce
Traditional commerce focuses on E-commerce trading activities are
the ex- change of products and online via the internet and can be
services through considered
personal interactions so it is automatic.
manual.
Traditional commerce is limited to E-commerce is 24X7, it can be
busi- done
ness hours, mostly during the day. anytime day and night.
As far as consumer interactions E-commerce can be termed as
are con- screen to face interaction.
cerned, traditional commerce
provides face to face interaction.
Traditional commerce is limited to E-commerce is global and has no
a physical
particular geographical location. limitation.
Modes of payment in In E-commerce modes of payments
traditional commerce include cash, are bank transfer, credit card, e-
cheques and wallet, mobile
credit cards. payment and many more.
Goods and delivery of services is In E-commerce delivery of goods
instant or
with traditional commerce. services takes some time.
Traditional Commerce’s scope is E-commerce’s scope is global.
local.

(Q3)What are Advantages of E-Commerce ?


Answer:-Global scope: E-commerce provides the sellers with a global reach. Now
sellers and buyers can meet in the virtual world, without barrier of place
(geography).

 Electronic transaction: E-commerce reduces the paper work and


significantly lower the transaction cost. E-Commerce enables the use of

Science Q7. Question & Answer Page 9


credit cards, debit cards, smart cards, electronic fund transfer via bank's
website and other modes of electronic payment.
 Cost Saving: E-commerce application provides users with more options
to compare and select the cheaper and better option.
 Anytime shopping: One other great advantage is the convenience. A
customer can shop 24×7. The website is functional at all times, it does not
have working hours like a shop.
 No intermediaries: Electronic commerce also allows the customer and the
business to be in touch directly, without any intermediaries. This allows for
quick communication and transactions.

 Public services: E-commerce helps the government to deliver


public services such as healthcare, education, social services at a reduced
cost and in an improved manner.
(Q4)What are Disadvantages of E-Commerce?
Setup Cost : The setup of the hardware and the software, the training cost of
employees, the constant maintenance and upkeep are all quite expensive.

 Physical presence: This lack of a personal touch can be a disadvantage for


many types of services and products like interior designing or the jewellery
business.
 Security: Security is another area of concern. Credit card theft, identity theft
etc. remain big concerns with the customers.
 Goods Delivery: There may arrive some problem with fulfillment of order.
Even after the order is placed there can be problems with shipping, delivery,
mix-ups etc. This leaves the customers unhappy and dissatisfied.

(Q5)What are Types of E-Commerce?

 Business - to - Consumer (B2C) : In B2C model, business sells it’s


products directly to a customer. A customer can view the products shown on
the website. The customer can choose a product and order the same. The
website will then send a notification to the business organization via email
and the organization will dispatch the product/ goods to the customer. These
B2C businesses are online retailers. Example : Amazon, Flipkart etc.
 Business - to - Business (B2B) : In B2B model, business sells it’s products
to an intermediate buyer who then sells the product to the final customer. As
an example, a wholesaler places an order from a company's website and
after receiving the consignment, sells the product to the final customer who
comes to buy the product at one of its retail outlets. Example : Tata
communications (network provider).
 Consumer - to - Consumer (C2C) : In C2C model, consumer helps
consumer to sell their assets like residential property, cars, motorcycles etc.,
or rent a room by publishing their information on the website. Website may
Science Q7. Question & Answer Page 10
or may not charge the consumer for its services. Example OLX, Quikr,
online auction.
 Consumer - to - Business (C2B) : In this model, consumers have products
or services of value that can be consumed by businesses. Eg Cashify
(Q6) Explain E-Commerce Trade Cycle?
A trade cycle is the series of exchanges, between a customer and supplier that
take place when a commercial exchange is executed. A general trade cycle
consists of following phases:

 Pre-Sales : It consist of two steps like Search and Negotiate. Customer


search for required website for product to be purchased. In Negotiate step
customer find a supplier who offers good quality product at cheaper price
and then customer agrees the terms forwarded by supplier.
 Execution : This phase consist of Order and Delivery. Customer sends an
order for the selected product and after processing the order, customer
receives delivery of the product.
 Settlement : This phase consist of Invoice (if any) and Payment. Invoice
means customer will receive a bill for purchased product and after
confirmation of received product, customer will pay for the same.
 After-Sales : This phase consists of warranty and After Sale Services. In
warranty period, customer will get all maintenance services for free or at
minimum cost. After sale services means customer will do complaints (if
any) about the performance of product and get maintenance service from the
supplier.

Science Q7. Question & Answer Page 11


(Q7)What are Modes of Payment? Explain.

 Credit Cards : Credit cards are the most common way for customers to pay
online. Merchants can reach out to an international market with credit cards,
by integrating a payment gate- way into their business.
 Mobile Payments : Mobile payments offer a quick solution for customers to
purchase on e-commerce websites. Mobile payments are also commonly
used on donation portals, browser games and social media networks such as
dating sites where customer can pay by scanning a barcode on an app on
mobile. Examples are apps like BHIM, UPI, Paytm, Google Pay,
Paypal,..etc.
 Bank Transfers : Bank transfer is used when money is sent from one bank
account to another. Transferring money from bank account is usually fast
and safer than withdrawing and paying in cash because every transaction
will be authenticated by checking customer’s banking credentials.
Example : NEFT, IMPS etc.
 E-wallets : E-wallet is a type of electronic card which is used for
transactions made online through a computer or a smartphone. E-wallet is a
type of pre-paid account in which a user can store money for any future
online transaction. An E-wallet is protected with a password. Examples are
State Bank Buddy, Paytm Wallets.

8)What are Forms of E-Commerce?

 M-commerce (Mobile commerce) : M-Commerce is the buying and selling


of goods and services through wireless handheld devices such as
smartphones and tablets.
 Social Commerce : Social commerce is a form of electronic commerce that
involves social media, online media that supports social interaction.
Q9) what is E-Commerce Technology?
Electronic commerce draws on technologies such as mobile commerce, electronic
funds transfer, supply chain management, Internet marketing, online transaction
processing, electronic data interchange(EDI), inventory management systems and
automated data collection systems. One of the common E-commerce technology
i.e EDI.

Science Q7. Question & Answer Page 12


Q10) What is Electronic Data Interchange (EDI) ? (MOST IMP Question)

1. EDI is the electronic interchange of business information using a


standardized format.
2. A process which allows one company to send information to another
company electronically rather than on paper.
3. Business entities conducting business electronically are called trading
partners.
4. Many business documents can be exchanged using EDI; two most common
documents are purchase orders and invoices.
5. It is computer-to-computer interchange of strictly formatted documents via
telecommunications or physically transported on electronic storage media.

(Q11)What is E-Governance?

1. It signifies the implementation of information technology in the


government processes and functions so as to cause simple, moral,
accountable and transparent governance.
2. The basic purpose of e-governance is to simplify processes for all, i.e.
government, citizens, businesses etc. at National, State and local levels.
Hence, E-governance delivers SMART government. (S- Simple, M-Moral,
A-Accessible, R-Responsive, T-Transparent Government).

(Q12)What are Advantages of E-governance?

 Reduced corruption
 High transparency
 Increased convenience
 Direct participation of constituents
 Reduction in overall cost.
 Expanded reach of government

(Q13)Explain all Types of E-Governance?
Answer:-E-Governance is of 4 types depending on the specific types of services.
Government-to-Citizen (G2C) :

 The Government-to-citizen refers to the government services which enable


citizens to get access to wide variety of public services.
 Most of the government services fall under G2C.
 It helps the ordinary people to reduce the time and cost to conduct a
transaction.

Science Q7. Question & Answer Page 13


 A citizen can have access to the services anytime from anywhere.
 Furthermore, Many services like license renewals and paying tax are
essential in G2C. It also focuses on geographic land barriers.
Government-to-Business (G2B)

 The Government to business is the exchange of services between


Government and Business organizations.
 G2B provides access to relevant forms needed to comply.
 The G2B also consists of many services exchanged between business sectors
and government.
 It aims at eliminating paper work, saving time, cost and establish
transparency in the business environment, while interacting with
government.
Government-to-Government (G2G)

 The Government-to-Government refers to the interaction between different


government departments, organizations and agencies.
 In G2G, government agencies can share the same database using online
communication.
 The government departments can work together. In conclusion, G2G
services can be at the local level or the international level.
 Likewise, it provides safe and secure inter-relationship between domestic or
foreign government.
Government-to-Employee (G2E)

 The Government-to-Employee is the internal part of G2G sector.


 Furthermore, G2E aims to bring employees together and improvise
knowledge sharing.
 Similarly, G2E provides online facilities to the employees like applying for
leave, reviewing salary payment record and checking the balance of holiday.
 The G2E sector provides human resource training and development.
 So, G2E is also the relationship between employees, government institutions
and their management.
(Q14)What is Encryption?
Encryption is widely used on the internet to protect user information being
sent between a browser and a server.

1. This includes passwords, payment information and other personal


information that should be considered private.
2. The process consists of two processes as encryption and decryption.
3. Encryption converts Plain text (readable form of data) into Cipher Text
(coded form of data) means non-readable form of data.
4. Decryption is exactly opposite process of encryption.
5. It converts Cipher text into Plain text.

Science Q7. Question & Answer Page 14


Encryption is of two types-
1)Symmetric (Private-Key Encryption ) 2) Asymmetric (Public-Key
Encryption )
(Q15)What is Digital Signature?-

1. A digital signature is also known as an electronic signature.


2. A digital signature guarantees the authenticity of an electronic document or
message in digital communication and uses encryption technique
(asymmetric cryptography) which provide proof of original and unmodified
documentation.
3. Digital signatures are used in e-commerce, software distribution, and
financial transactions. This is the direct transfer of information between two
partners.

(Q16)What is Digital Certificate?


1)Digital Certificate is an electronic "password" that allows a person,
organization to exchange data securely over the Internet using the public key
infrastructure(PKI).
2)Digital Certificate is also known as a public key certificate or identity
certificate.
3)In this information is transferred between two authorized partners who have
digital certificates issued by some supreme authority.

Science Q7. Question & Answer Page 15


HTML Programs

List: Friends And Hobbies

<!Doctype html>
<html>
<head>
<title>Hobbies</title>
</head>
<body>
<ol>
<li>ABC</li>
<ul type = "circle">
<li> Playing </li>
<li> Reading </li>
</ul>
<li>XYZ</li>
<ul type= "circle">
<li>Swimming</li>
<li>Sketching</li>
</ul>
</ol>
</body>
</html>
HTML Programs

List : Language for Speaking And Computer Languages

<!doctype html>
<html>
<head>
<title>
list in HTML
</title>
</head>
<body>
<h1 align="center">Ordered & Unordered list</h1>
<h2>Languages Used For Speaking</h2>
<ol>
<li>English</li>
<li>Hindi</li>
<li>Marathi</li>
</ol>
<h2>Computer Languages</h2>
<ul>
<li>Python</li>
<li>C++</li>
<li>Java</li>
</ul>
</body>
</html>
HTML Programs

List- Animal And Flower ( ordered and unordered list)

<!doctype html>
<html>
<head>
<title>
Animal and Flower
</title>
</head>
<body>
<h1 align="center">Animal and Flower</h1>
<h2>Animal</h2>
<ol>
<li>Tiger</li>
<li>lion</li>
<li>Fox</li>
<li>Elephent</li>
<li>Zebra</li>
</ol>
<h2>Flower</h2>
<ul>
<li>Rose</li>
<li>lily</li>
<li>Tulips</li>
<li>Orchids</li>
<li>Amber</li></ul>
</body>
</html>
HTML Programs

List –Course And Subject names(Nested list)

<!doctype html>
<html>
<head>
<title>
Subject and Chapter
</title>
</head>
<body>
<h1 align="center">Subject and Chapter</h1>
<h2>Courses and Subjects</h2>
<ul>
<li>BA</li>
<ol>
<li>Philosophy</li>
<li>Economics</li>
<li>Literature</li>
<li>Psychology</li>
<li>Sociology</li>
</ol>
<li>BCom</li>
<ol>
<li>Accounting</li>
<li>Finance</li>
<li>Economics</li>
<li>Business Management</li>
<li>Marketing</li>
<li>Entrepreneurship</li>
</ol>

<li>B.Sc</li>
<ol>
<li>Physics </li>
<li>Chemistry</li>
<li>Biology</li>
<li>Maths </li>
</ol>
</ul>
</body>
</html>
HTML Programs

List : Flower And Fruit( Ordered and Unordered List)

<!doctype html>
<html>
<head>
<title>
Flower and Fruits
</title>
</head>
<body>
<h1 align="center">Flower and Fruits</h1>
<h2>Flowers</h2>
<ol>
<li>Rose</li>
<li>lily</li>
<li>Tulips</li>
<li>Orchids</li>
<li>Amber</li>
</ol>
<h2>Fruits</h2>
<ul>
<li>Apple</li>
<li>Grapes</li>
<li>Mango</li>
<li>Strawberry</li>
<li>Blueberry</li>
</ul>
</body>
</html>
HTML Programs

List : Student And Subject (unordered and ordered list)

<!doctype html>
<html>
<head>
<title>Student and Subject </title>
</head>
<body>
<h1 align="center">Student and Subject </h1>
<h2>Student</h2>
<ul>
<li>Atharv</li>
<li>Prasad</li>
<li>Vijay</li>
<li>Raj</li>
<li>Soham</li>
</ul>
<h2>Subject</h2>
<ol>
<li>Marathi</li>
<li>Hindi</li>
<li>English</li>
<li>Maths</li>
<li>Science</li>
</ol>
</body>
</html>
HTML Programs

List- Subject and Topics(Nested list)

<!doctype html>
<html>
<head>
<title>
Subject and Chapter
</title>
</head>
<body>
<h1 align="center">Subject and Chapter</h1>
<h2>Subject</h2>
<ul>
<li>IT</li>
<ol>
<li>Web Designing</li>
<li>SEO</li>
<li>Javascript</li>
<li>Emerging Technology</li>
<li>E-Commerce</li>
</ol>
<li>Physics</li>
<ol>
<li>Electrostatics</li>
<li>Current Electricity</li>
<li>Optics</li>
</ol>

<li>Chemistry</li>
<ol>
<li>Solutions </li>
<li>Electrochemistry</li>
<li>Chemical Kinetics</li>
<li>Biomolecules </li>
</ol>
</ul>
</body>
</html>
HTML Programs

External CSS

<!doctype html>

<html>

<head>

<title>

External CSS

</title>

<link rel="stylesheet" type="text/css" href="style.css">

</head>

<body>

<h1 align="center">External CSS</h1>

<b>Like my web page</b>

</body>

</html>
HTML Programs

Internal Css:

<!doctype html>

<html>

<head>

<title>

Internal CSS

</title>

<style>

h1{border-style:dotted}

body{background-color:skyblue}

</style>

</head>

<body>

<h1 align="center">Internal CSS</h1>

</body>

</html>
HTML Programs

1. Write a html program to accept Name of the College, Total number of students in the
college, Total number of halls (range till 100). The data should be sent to the server.

<!doctype html>
<html>
<head>
<title> College Data </title>
</head>
<body>
<h1> College Information Form</h1>
<form name="Clgform" method="post" action="process.php">
Name of the College :
<input type="text" name="clg_name">
<br> <br>
Total No. of Students :
<input type="number" name="stud_no" min=1>
<br> <br>
Total No. of Halls :
<input type="range" name="hall_no" min=1 max=100>
<br> <br>
<input type="submit" value="SUBMIT">
input type="reset" value="RESET">
</form>
</body>
</html>
HTML Programs

2. Write a html program to accept Name of the Employee (cannot be blank), Email Id of
the Employee, Salary (maximum 50000). The data should be sent to the server.

<!doctype html>
<html>
<head>
<title> Employee Data </title>
</head>
<body>
<h1> Employee Information Form</h1>
<form name="empform" method="post" action="process.php">
Name of the Employee :
<input type="text" name="emp_name" REQUIRED>
<br> <br>
Email ID :
<input type="email" name="emp_email" min=1>
<br> <br>
Salary :
<input type="number" name="emp_sal" min=1 max=50000>
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
HTML Programs

3. Write a html program to create a form to accept Doctor's name, number of patients
(maximum 20), Date of examining patients

<!doctype html>
<html>
<head>
<title> Hospital Data </title>
</head>
<body>
<h1> Doctor Information Form</h1>
<form name="docform" method="post" action="process.php">
Name of the Doctor :
<input type="text" name="doc_name" REQUIRED>
<br> <br>
No. of Patients :
<input type="number" name="patient_no" min=1 max=20>
<br> <br>
Date of Examination :
<input type="date" name="ex_date">
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
HTML Programs

4. Write a html program to create a form to accept Patient's name, his mobile number
and date of birth. Keep all fields compulsory.

<!doctype html>
<html>
<head>
<title> Hospital Data </title>
</head>
<body>
<h1> Patient Information Form</h1>
<form name="docform" method="post" action="process.php">
Name of the Patient :
<input type="text" name="pat_name" REQUIRED>
<br> <br>
Mobile No. :
<input type="number" name="pat_mobile" REQUIRED>
<br> <br>
Date of Birth :
<input type="date" name="pat_date" REQUIRED>
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
HTML Programs

5. Write a html program to create a form to accept student's name, number of practicals
he has completed and provide facility to upload his completion certificate.

<!doctype html>
<html>
<head>
<title> Student Data </title>
</head>
<body>
<h1> Student Practical Information Form</h1>
<form name="studform" method="post" action="process.php">
Name of the Student :
<input type="text" name="stud_name" REQUIRED>
<br> <br>
No. of Practicals Completed :
<input type="number" name="practical_no" min=1>
<br> <br>
Upload Completion Certificate :
<input type="file" name="certificate">
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
HTML Programs

6. Write a html program to create a form to accept students roll no (in number format),
Unit test marks (maximum 25 marks), Terminal exam marks (maximum 50 marks).
Include the name of the Subject teacher and send the data to the server.

<!doctype html>
<html>
<head>
<title> Student Data </title>
</head>
<body>
<h1> Student Exam Marks Form</h1>
<form name="studform" method="post" action="process.php">
Student Roll No :
<input type="number" name="stud_roll" min=1>
<br> <br>
Unit Test Marks :
<input type="number" name="unit_test" min=0 max=25>
<br> <br>
Terminal Exam Marks :
<input type="number" name="unit_test" min=0 max=50>
<br> <br>
Name of the Subject Teacher :
<input type="text" name="sub_teacher">
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
HTML Programs

7. Write a html program to create registration form to accept name, mobile no., date of
birth. The form should have register caption in the button to submit the data.

<!doctype html>
<html>
<head>
<title> User Data </title>
</head>
<body>
<h1> User Registration Form</h1>
<form name="userform" method="post" action="process.php">
Name of the User :
<input type="text" name="user_name">
<br> <br>
Mobile No. :
<input type="number" name="user_mobile">
<br> <br>
Date of Birth :
<input type="date" name="user_dob">
<br> <br>
<input type="submit" value="REGISTER">
<input type="reset" value="RESET">
</form>
</body>
</html>
HTML Programs

8. Write html program to accept Name of the hospital, Email Id of the hospital, Number of
beds in the hospital. The data should be sent to the server.

<!doctype html>
<html>
<head>
<title> Hospital Data </title>
</head>
<body>
<h1> Hospital Information Form</h1>
<form name="hospitalform" method="post" action="process.php">
Name of the Hospital :
<input type="text" name="hosp_name">
<br> <br>
Email Id. :
<input type="email" name="hosp_email">
<br> <br>
Number of beds in Hospital :
<input type="number" name="hosp_beds">
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
HTML Programs

9.A. Write html program to create a form to accept students roll no (in number format),
Unit test marks(maximum 25 marks), Terminal exam marks (maximum 50 marks).
Include the name of the Subject teacher and send the data to the server.

<!doctype html>
<html>
<head>
<title> Student Data </title>
</head>
<body>
<h1> Student Exam Marks Form</h1>
<form name="studform" method="post" action="process.php">
Student Roll No :
<input type="number" name="stud_roll" min=1>
<br> <br>
Unit Test Marks :
<input type="number" name="unit_test" min=0 max=25>
<br> <br>
Terminal Exam Marks :
<input type="number" name="unit_test" min=0 max=50>
<br> <br>
Name of the Subject Teacher :
<input type="text" name="sub_teacher">
<br> <br>
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</form>
</body>
</html>
HTML Programs

9.B. Write html program to accept student name, Date of birth and attendance
percentage in number format. Send the data to the server.

<!doctype html>
<html>
<head>
<title> Student Data </title>
</head>
<body>
<h1> Student Attendance Percentage </h1>
<form name="studform" method="post" action="process.php">
Student Name :
<input type="text" name="stud_name">
<br> <br>
Date of Birth:
input type="date" name="stud_dob">
<br> <br>
Attendance Percentage :
<input type="number" name="stud_attd" min=0 max=100>
<br> <br>
<input type="submit" value="SUBMIT">
input type="reset" value="RESET">
</form>
</body>
</html>
HTML Programs

10. Write a html program to display "Digital India" in Verdana font using internal CSS.
Add any two sentences about Digital India below in orange color.

<!doctype html>
<html>
<head>
<title> Digital India </title>
<style>
h1 { font-family : "Verdana"; }
p { color : orange; }
</style>
</head>
<body>
<h1> Digital India</h1>
<p> Digital India
</p>

<p> It making the country digitally empowered in the field of technology. </p>
</body>
</html>
HTML Programs

11. Write a html program to display "Maharashtra State Board" in blue color and font
size 30 pixels using internal CSS. Give background colour yellow for the web page.

<!doctype html>
<html>
<head>
<title> MS Board </title>
<style>
body { background-color : yellow; }
p{
color : blue;
font-size ; 30px;
}
</style>
</head>
<body>
<p> Maharashtra State Board</p>
</body>
</html>
HTML Programs

12. Write a html program to display "Maharashtra State Board" in font size 40 pixels
using internal CSS. Give background colour yellow for the same text.

<!doctype html>
<html>
<head>
<title> MS Board </title>
<style>
body { background-color : yellow; }
p { font-size ; 40px; }
</style>
</head>
<body>
<p> Maharashtra State Board</p>
</body>
</html>
HTML Programs

13. Write a html program to display "Web designing" in italic format and having
underline using internal CSS. Add any two sentences about web designing in green color.

<!doctype html>
<html>
<head>
<title> Web Designing </title>
<style>
h1 {
font-style : italic;
text-decoraton : underline;
}
p { color : green; }
</style>
</head>
<body>
<h1> Web Designing</h1>
<p> Web designing is the art of planning and arranging content on a website so
that it can be shared and accessed online with the world. </p>
<p> Web design encompasses many different skills and disciplines in the
production and maintenance of websites. </p>
</body>
</html>
HTML Programs

14. Write a html program to insert inline frame on web page. Use xyz html file as a source
for inline frame. Size of inline frame should be 100x100 pixels.

<!doctype html>
<html>
<head>
<title> Inline Frame example </title>
</head>
<body>
<h1> Inline Frame</h1>
<iframe src="xyz.html" height=100 width=100>
</body>
</html>
HTML Programs

15. Write html program to insert inline frame on web page. Use xyz html file as a source
for inline frame. Size of inline frame should be 300 x 300 pixels.

<!doctype html>
<html>
<head>
<title> Inline Frame example </title>
</head>
<body>
<h1> Inline Frame</h1>
<iframe src="xyz.html" height=300 width=300>
</body>
</html>
HTML Programs

16. Write html program to create an ordered list of 3 languages used for speaking and
unordered list having 2 computer languages.

<!doctype html>
<html>
<head>
<title> Languages </title>
</head>
<body>
<h2> Languages used for Speaking</h2>
<OL>
<LI> English </LI>
<LI> Hindi </LI>
<LI> Marathi </LI>
</OL>
<h2> Computer Languages</h2>
<UL>
<LI> Java </LI>
<LI> Python </LI>
</UL>
</body>
</html>
HTML Programs

17. Write html program to display names of two friends in ordered list and also display
their hobbies under their name in unordered list.

<!doctype html>
<html>
<head>
<title> Friends and their Hobbies </title>
</head>
<body>
<h2> Friends and their Hobbies</h2>
<OL>
<LI> Vedika </LI>
<UL>
<LI> Singing </LI>
<LI> Dance </LI>
</UL>
<LI> Riya </LI>
<UL>
<LI> Reading Books </LI>
<LI> Travelling to Historical Places </LI>
</UL>
</OL>

</body>
</html>
HTML Programs

18. Write html program to create an unordered list having names of two students. Add
ordered list of subjects they selected:

<!doctype html>
<html>
<head>
<title> Students subjects</title>
</head>
<body>
<h2> Student List with subjects</h2>
<UL>
<LI> Sanika</LI>
<OL>
<LI> IT</LI>
<LI> Maths</LI>
</OL>
<LI> Sachin</LI>
<OL>
<LI> English </LI>
<LI> PT </LI>
</OL>
</UL>

</body>
</html>
Write JavaScript code to print subtraction of 2 numbers.
1.
2 .Write JavaScript code to print addition of 2 numbers.

3 .Write JavaScript code to print multiplication of 2 numbers.

4 .Write JavaScript code to print division of 2 numbers.

5 .Write JavaScript code to print addition, subtraction, multiplication & division of 2 numbers.

6 .Write JavaScript code to display area of circle, accept value from user.

7 .Write JavaScript code to print area of triangle.

8 .Write JavaScript code to calculate the average of three numbers.

9 .Write JavaScript code to print perimeter of rectangle.

10 .Write JavaScript code to print perimeter of trapezium.

11 .Write JavaScript code to check whether the number is odd or even.

12 Write JavaScript code to enter two values and display the largest.

13 .Write JavaScript code to print multiplication table of 3.

14 .Write JavaScript code to print numbers from 1 to 10.

15 .Write JavaScript code to print sum of 50 natural numbers.

16 .Write JavaScript code to print all even numbers from 10 to 50.

17 .Write JavaScript code when user click on button, it will display sum of even numbers from 1
to 10.
18 .Write JavaScript code to print all odd numbers from 50 to 100.

19 .Write JavaScript code to print factorial of given no( 7 seven) on button click.

20 .Write JavaScript code to print square of a accepted number.

21 .Write JavaScript code to count length of accepted string after click on the button.

22 .Write JavaScript code to accept two dates and find the difference in those dates.

23 .Write JavaScript code to take a input of string and reverse the string in output.

24 Write JavaScript code to print factorial of accepted number.

25 Write JavaScript code to take a input of number and calculate cube of number.

26 Write a javascript code to display if accepted no. is prime no. or not.


JAVA SCRIPT Programs with solutions

1.Write JavaScript code to print subtraction of 2 numbers.

<! DOCTYPE html>

<html>

<head>

<title>JS program to subtract two numbers</title>

</head>

<body>

<script>

var n1, n2, diff;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

diff=n2-n1;

alert("Subtraction - " + diff);

</script>

</body>

</html>
2.Write JavaScript code to print addition of 2 numbers.
<! DOCTYPE html>

<html>

<head>

<title>JS program to add two numbers</title>

</head><body>

<script>

var n1, n2, sum;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

sum=n1+n2;

alert("Sum- " + sum);

</script>

</body>

</html>
3.Write JavaScript code to print multiplication of 2 numbers.

<! DOCTYPE html>

<html><head>

<title>JS program to multiply two numbers</title>

</head>

<body>

<script>

var n1, n2, prod;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

prod=n1*n2;

alert("Multiplication - " + prod);

</script>

</body>

</html>
4.Write JavaScript code to print division of 2 numbers.
<! DOCTYPE html>

<html>

<head>

<title>JS program to divide two numbers</title>

</head>

<body>

<script>

var n1, n2, q;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

q=n1/n2;

alert("Division - " + q);

</script></body></html>
5.Write JavaScript code to print addition, subtraction,
multiplication & division of 2 numbers.
<! DOCTYPE html>

<html>

<head>

<title>JS program to add, subtract, multiply, divide two numbers</title>

</head>

<body>

<script>

var n1, n2, s,d,m,q;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

s=n1+n2;

d=n2-n1;

m=n1*n2;

q=n1/n2;

document.write("<br>Sum - " + s);

document.write("<br>Difference - " + d);

document.write("<br>Product - " + m);

document.write("<br>Division - " + q);

</script>

</body>

</html>
6.Write JavaScript code to display area of circle, accept value from
user.

<!Doctype html>

<html>

<body>

<form name="f1">

Enter Radius:

<input type="number" name="n1"><br><br>

<input type="button" name="b1" value="Area of circle" onClick="area()">

</form>

</body>

<script type="text/javascript">

function area()

var b,h,a;

r=parseInt(f1.n1.value);

a=3.14*r*r;

alert("Area of circle is "+a);

</script>

</html>
7. Write JavaScript code to print area of triangle.
<Doctype html>

<html>

<body>

<form name="f1">

Enter Base

<input type="number" name="n1"><br><br>

Enter Hieght

<input type="number" name="n2"><br><br>

<input type="button" name="b1" value="Area of Triangle" onClick="area()">

</form>

</body>

<script type="text/javascript">

function area()

var b,h,a;

b=parseInt(f1.n1.value);

h=parseInt(f1.n2.value);

a=1/2*b*h;

alert("Area of Triangle is "+a);

</script>

</html>
8.Write JavaScript code to calculate the average of three numbers.
<! DOCTYPE html>

<html>

<head>

<title>JS program to calculate average of three numbers</title>

</head>

<script>

var n1, n2, n3, avg;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

n3=parseInt(prompt("Enter third number:"));

avg=(n1+n2+n3)/3;

alert("Average = " + avg);

</script></html>
9.Write JavaScript code to print perimeter of rectangle.
<! DOCTYPE html>

<html>

<head>

<title>JS program to calculate perimeter of rectangle</title>

</head>

<body>

<script>

var length, breadth, p;

length=parseInt(prompt("Enter length of the rectangle:"));

breadth=parseInt(prompt("Enter breadth of the rectangle:"));

p=2*(length+breadth);

alert("Perimeter- " + p);

</script>

</body>

</html>
10.Write JavaScript code to print perimeter of trapezium.
<! DOCTYPE html>

<html>

<head>

<title>JS program to calculate perimeter of trapezium</title>

</head>

<body><script>var a, b, c, d, p;

a=parseInt(prompt("Enter length of the first side of trapezium:"));

b=parseInt(prompt("Enter length of the second side of trapezium:"));

c=parseInt(prompt("Enter length of the third side of trapezium:"));

d=parseInt(prompt("Enter length of the fourth side of trapezium:"));

p=a+b+c+d;

alert("Perimeter - " + p);

</script>

</body>

</html>
11.Write JavaScript code to check whether the number is odd or
even.
<! DOCTYPE html>

<html>

<head>

<title>JS program to check number is odd or even</title>

</head>

<body>

<script>

var n;

n=parseInt(prompt("Enter a number:"));

if(n%2==0)

alert("Number is even");

else

alert("Number is odd");

</script></body></html>
12. Write JavaScript code to enter two values and display the
largest.
<! DOCTYPE html>

<html>

<head>

<title>JS program to find largest number</title>

</head>

<body>

<script>

var n1, n2;

n1=parseInt(prompt("Enter first number:"));

n2=parseInt(prompt("Enter second number:"));

if(n1>n2)

alert("Larger number - " + n1);

else

alert("Larger number - " + n2);

</script></body></html>
13. Write JavaScript code to print multiplication table of 3.
<! DOCTYPE html>

<html>

<head>

<title>JS program to print multiplication table of 3</title>

</head>

<body>

<script>

var n=3, i;

document.write("Multiplication table of 3");

for(i=1;i<=10;i++)

document.write("<br>"+n+" * "+i+" = "+n*i);

</script></body></html>
14. Write JavaScript code to print numbers from 1 to 10.
<! DOCTYPE html>

<html>

<head>

<title>JS program to print numbers from 1 to 10</title>

</head>

<body><script>

var i;

document.write("Numbers from 1 to 10");

for(i=1;i<=10;i++)

document.write("<br>"+i);

</script>

</body></html>
15. Write JavaScript code to print sum of 50 natural numbers.
<! DOCTYPE html>

<html>

<head>

<title>JS program to print sum of 50 natural numbers.</title>

</head>

<body>

<script>

var i, sum=0;

document.write("Sum of numbers from 1 to 50");

for(i=1;i<=50;i++)

{ document.write("<br>"+i);

sum=sum+i;

document.write("<br>Sum - "+sum);

</script>

</body></html>
16. Write JavaScript code to print all even numbers from 10 to 50.
<! DOCTYPE html>

<html>

<head>

<title>JS program to print even numbers from 10 to 50</title>

</head>

<body><script>

var i;

document.write("Even Numbers from 10 to 50");

for(i=10;i<=50;i++)

if(i%2==0)

document.write("<br>"+i);

</script></body></html>
17. Write JavaScript code when user click on button, it will display
sum of even numbers from 1 to 10.
<! DOCTYPE html>

<html>

<head>

<title>JS program to print sum of even numbers.</title>

<script>

function display_sum() {

var i, sum=0;

for(i=1;i<=10;i++)

if(i%2==0)

sum=sum+i;

alert("Sum of even numbers upto 10="+sum);

</script></head>

<body>

<input type="button" name="disp_sum" value="Display Sum"


onclick="display_sum()">

<br><p id="disp"></p>

</body></html>
18.Write JavaScript code to print all odd numbers from 50 to 100.
<! DOCTYPE html>

<html>

<head>

<title>JS program </title>

</head>

<body>

<h1>JS program to print odd numbers from 50 to 100</h1>

<script>

var i;

document.write("Odd Numbers from 50 to 100");

for(i=50;i<=100;i++)

{ if(i%2!=0)

document.write("<br>"+i);

}</script></body></html>
19.Write JavaScript code to print factorial of given no.(7 seve) on
button click.
<! DOCTYPE html>

<html>

<head>

<title>JS program - factorial of number</title>

<script>

function display_factorial(num) {

var i, f = 1;

for (i = num; i >= 1; i--)

{ f=f*i;

document.getElementById("disp").innerHTML = "Factorial of 7 - " + f;

</script></head>

<body>

<h1>JS program to print factorial of number</h1>

<input type="button" name="disp_fact" value="Display Factorial"


onclick="display_factorial(7)">

<br><p id="disp"></p>

</body></html>
20.Write JavaScript code to print square of a accepted number.
<! DOCTYPE html>

<html>

<head>

<title>JS program to display square of a number</title>

</head>

<body>

<script>

var n, r;

n=parseInt(prompt("Enter a number:"));

r=n*n

alert("Square - " + r);

</script>

</body>

</html>
21.Write JavaScript code to count length of accepted string after click on the
button.

<! DOCTYPE html>

<html>

<head>

<title>JS program</title>

<script>

function display_length() {

var str, len;

str = form1.str_box.value;

len = str.length;

document.getElementById("disp").innerHTML = "Length of String - " + len;

</script>

</head>

<body>

<h1>JS program to print length of string</h1>

<form name="form1">

<input type="text" name="str_box" size=50>

<input type="button" name="disp_strlen" value="Display Length"


onclick="display_length()">

</form><br>

<p id="disp"></p>

</body></html>
22.Write JavaScript code to accept two dates and find the difference
in those dates.
<!doctype html>
<html><head><title>JS program</title>

<script>

function display_diff() {

var d1, d2, diff;

d1 = new Date(form1.date1.value);

d2 = new Date(form1.date2.value);

diff = (d2 - d1) / (1000 * 3600 * 24);

document.getElementById("disp").innerHTML = "Difference of dates in days - "


+ diff;

</script></head><body>

<h1>JS program to display difference between dates</h1>

<form name="form1">

<input type="date" name="date1"><br><br>

<input type="date" name="date2"><br><br>

<input type="button" name="disp_diff" value="Display Difference"


onclick="display_diff()">

</form><br>

<p id="disp"></p>

</body>

</html>
23.Write JavaScript code to take a input of string and reverse the
string in output.
<html>

<head>

<title>JS program - reverse of string</title>

<script>

function display_reverse(str) {

var newstr;

newstr = str.split("").reverse().join("");

document.write("Reverse of String - " + newstr);

</script>

</head>

<body>

<h1>JS program to reverse a string</h1>

<script>

var s;

s = prompt("Input a string");

display_reverse(s);

</script></body></html>
24. Write JavaScript code to print factorial of accepted number.

<!Doctype html>

<html>

<body>

<form name="f1">

Enter Number :<input type="number" name=n1><br><br>

<input type="button" name="b1" value="Factorial" onclick="fact()">

</form>

</body>

<script type="text/javascript">

function fact()

var a, f=1,i;

a=parseInt(f1.n1.value);

for(i=a;i>=1;i--)

f=f*i;

alert("Factorial of a Number is "+f);

</script>

</html>
25.Write JavaScript code to take a input of number and calculate
cube of number.

<!doctype html>

<html>

<body>

<form name="f1">

Enter a Number

<input type="number" name="n1"><br><br>

<input type="button" name="b1" value="cube" onmousemove="chk()">

</form>

</body>

<script type="text/javascript">

function chk()

var n,c;

n=parseInt(f1.n1.value);

c=n*n*n;

alert("Cube of a Number is "+c);

</script>

</html>
26.Write a javascript code to display if accepted no. is prime no. or not.

<!doctype html>

<html><body>

<form name="f1">

Enter a Number

<input type="number" name="n1"><br><br>

<input type="button" name="b1" value="check Prime" onclick="pr()">

</form></body>

<script type="text/javascript">

function pr()

var a,p=1,i;

a=parseInt(f1.n1.value);

for(i=2;i<a;i++)

if(a%i==0)

p=0;

if(p==1)

alert("Number is Prime Number");

else

alert("Number is not a Prime Number");

</script>

</html>

You might also like