0% found this document useful (0 votes)
345 views24 pages

Maharashtra 12th Board Exam Program

Uploaded by

kapareparth
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)
345 views24 pages

Maharashtra 12th Board Exam Program

Uploaded by

kapareparth
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/ 24

Board Exam Program List

Javascript Program

1. Write an even driven JavaScript program to display numbers from 1 to 100 when the mouse is moved
over a button.

<!DOCTYPE html>
<html>
<head>
<title>1 to 100 Number</title>
<script language="javascript">
function table()
{
for(var i=1;i<=100;i++)
{
document.write(i+",");
}

}
</script>
</head>
<body align="center">
<form>
<h1>Display 1 to 100 Number.</h1>
<input type="submit"value="Result"onmouseover="table()">
</form>
</body>
</html>
2. Write an even driven JavaScript program to display table of accepted number .(EG 2*1=2 2*2=4….)

<!DOCTYPE html>
<html>
<head>
<title>1 to 100 Number</title>
<script language="javascript">
function table()
{
var num;
num=parseInt(form1.t1.value);
for(var i=1;i<=10;i++)
{
document.write(num+"*"+i+"="+i*num+"<br>");
}

}
</script>
</head>
<body align="center">
<form name="form1">
<h1>Given Number of table</h1>
Enter Number:<input type="text" name="t1"><br><br>
<input type="submit"value="Result"onclick="table()">
</form>
</body>
</html>

3. Write an even driven JavaScript program to display perimeter of a square. Accept side value from the
user. Perimeter=2 x side x side .

=><!DOCTYPE html>

<html>

<head>

<title></title>

<script type="text/javascript">

function peri()

var side,perimeter;

side=document.f1.t1.value;

perimeter=2*side*side;

document.write("Perimeter of square is : "+perimeter);

</script>

</head>

<body>
<form name="f1">

Enter Side : <input type="text" name="t1"> <br> <br>

<input type="button" value="Perimeter of Square" onclick="peri()">

</form>

</body>

</html>

4. Write an even driven JavaScript program to display multiplication and subtraction of two accepted
number. When the mouse is moved over the button.

<!DOCTYPE html>
<html>
<head>
<title>Multiplication & Substraction</title>
<script language="javascript">
function mult()
{
var a,b,c;
a=parseInt(form1.t1.value);
b=parseInt(form1.t2.value);
c=a*b;
document.write("Multiplication is:"+c);
}
function sub()
{
var a,b,c;
a=parseInt(form1.t1.value);
b=parseInt(form1.t2.value);
c=a-b;
document.write("Substraction is:"+c);
}

</script>
</head>
<body align="center">
<form name="form1">
<h1>Multiplication & Substraction</h1>
First Number:<input type="text"name="t1"><br><br>
Second Number:<input type="text"name="t2"><br><br>
<input type="submit" value="Multiplication" onmouseover="mult()">
<input type="submit" value="Substraction" onmouseover="sub()">
</form>
</body>
</html>
5. Write an event driven JavaScript program to display factorial of number 25 when mouse is moved on
the button.

=><html>
<head>
<title></title>
<script language="javascript">
function fact()
{
var f;
f=1;
for(i=1;i<=25;i++)
{
f=f*i;
}
document.write("factorial of 25 is = "+f);
}
</script></head>
<body>
<form name=f1>
<input type="button" value="factorial"onMousemove="fact()">
</form>
</body>
</html>

6.Write an event driven javascript program to display factorial of the accepted number(EG.4=1*2*3*4=24)
<html>
<head>
<title></title>
<script language="javascript">
function fact()
{
var a,f;
f=1;
a=document.f1.t1.value;
for(i=1;i<=a;i++)
{
f=f*i;
}
document.write("factorial="+f);

}
</script></head>
<body>
<form name=f1>
Enter number<input type="text"name="t1"><br>
<input type="button" value="factorial"onClick="fact()">
</form>
</body>
</html>
6. Write an event driven JavaScript program to display factorial of accepted number.(EG.
4=1*2*3*4=24)
=> <!DOCTYPE html>
<html>
<head>
<title>Factorial Number</title>
</head>
<body>
<h1>Factorial Number</h1>
Enter a number:<input type="number" id="number">
<button onclick="calculate()">Calculate Factorial</button>
<p id="result"></p>

<script>
function calculate() {
var number = document.getElementById("number").value;
var factorial = 1;
for (var i = 1; i <= number; i++)
{
factorial *= i;
}
document.getElementById("result").innerHTML = "The factorial of " + number + " is " + factorial;
}
</script>
</body>
</html>
7. Write an even driven JavaScript program to display cube of the accepted number when the mouse is
moved over a button.

=><html>
<head>
<title></title>
<script language="javascript">
function cube()
{
var a;
a=parseInt(document.f1.t1.value);
document.write("cube=",a*a*a);
}
</script></head>
<body>
<form name=f1>
Enter number<input type="text"name="t1"><br>
<input type="button" value="show result"onmouseover="cube()">
</form>
</body>
</html>
8. Write an even driven JavaScript program to display sum of numbers from 150 to 1000 when the mouse
is moved over a button.

=><html>
<head>
<title></title>
<script language="javascript">
function sum()
{
var i,t;
t=0;
document.write("sum of 150 to 1000 number:");
for(i=150;i<=1000;i++)
{
t=t+i;
document.write("<br>"+i);
}
document.write("<br>");
document.write("sum="+t);
}
</script></head>
<body>
<form name=f1>
<input type="button" value="display"onmouseover="sum()">
</form>
</body>
</html>
9. Write an even driven JavaScript program to display area of a rectangle. Accept length and breadth
from the user. (area=lxb)

=><!DOCTYPE html>

<html>

<head>

<title>Area of Rectangle</title>

<script type="text/javascript">

function rect()

var l,b,area;

l=document.f1.t1.value;

b=document.f1.t2.value;

area=l*b;

document.write("Area of Rectangle is : "+area);

</script>

</head>

<body>

<form name="f1">
Enter Length :<input type="text" name="t1"> <br><br>

Enter Breadth : <input type="text" name="t2"> <br><br>

<input type="button" value="Area" onclick="rect()">

</form>

</body>

</html>

10. Write an even driven JavaScript program to display even number between 50 to 100.

=><html>
<head>
<title> </title>
<script language="javascript">
// program to display all even number between given range.
function even()
{
var ,i;
for(i=50;i<=100;i++)
{
if(i%2==0)
{
document.write("<br>"+i);
}
}
}
</script>
</head>
<body>
<form name="f1">
<input type="button" name="b1" value="Even Numbers" onClick="even()">
</form>
</body>
</html>
11. Write an even driven JavaScript program to display number of character from the accepted string.

=><html>
<head>
<title>Length of string</title>
<script language="javascript">
function strlen()
{
var s,l;
s=document.f1.str.value;
l=s.length;
document.write("Length of string is : "+l);
}
</script>
</head>
<body>
<form name="f1">
Enter the String :<input type="text" name="str"><br>
<input type="button" value="Calculate length" onclick="strlen()">
</form>
</body>
</html>
12. Write an even driven JavaScript program to display square of a number and cube of an accepted
number on click of button.

=><html>
<head>
<title></title>
<script language="javascript">
function cube()
{
var a;
a=parseInt(document.f1.t1.value);
document.write("square=",a*a);
document.write("<br>")
document.write("cube=",a*a*a);
}
</script></head>
<body>
<form name=f1>
Enter number<input type="text"name="t1"><br>
<input type="button" value="show result"onClick="cube()">
</form>
</body>
</html>
13. Write an event driven JavaScript program to display addition and remainder of two accepts numbers
when the mouse is moved over a button.

=><!DOCTYPE html>

<html>

<head>

<title>Addition</title>

<script type="text/javascript">

function result()

var num1,num2,add,rem;

num1=parseInt(document.f1.t1.value);

num2=parseInt(document.f1.t2.value);

document.write("Entered Values are num1 = "+num1+" and num2 = "+num2+"<br>");

add=num1+num2;

document.write("Addition of num1 and num2 is : "+add+"<br>");

rem=num1%num2;

document.write("Remainder of num1 by num2 is : "+rem);

</script>

</head>

<body>

<form name="f1">

Enter Number 1:<input type="text" name="t1"> <br><br>

Enter Number 2:<input type="text" name="t2"> <br><br>

<input type="button" value="Print" onclick="result()">


</form>

</body>

</html>

14. Write an event driven JavaScript program to display area of circle Accept radius from the user
(area=3.14*r*r).

=><html>
<head>
<title></title>
<script language="javascript">
function circle()
{
var r;
r=parseFloat(document.f1.t1.value);
document.write("Area of Circle=",3.14*r*r);
}
</script></head>
<body>
<form name=f1>
Enter number<input type="text"name="t1"><br>
<input type="button" value="show result"onClick="circle()">
</form>
</body>
</html>
15. Write an event driven JavaScript program to display two color after every 2000 milliseconds when the
mouse is moved over a button.

=><!DOCTYPE html>

<html>

<head>

<title>Color Display</title>

<script language="javascript">

function color()

{
document.bgColor="Orange";

window.setTimeout("f1()",2000);

function f1()

document.bgColor="Pink";

window.setTimeout("color()",2000);

</script>

</head>

<body>

<input type="button" value="Display Colors" onMouseOver='window.setTimeout("color()",2000)'>

</body>

</html>

16. Write an event driven JavaScript program to accept age and display message “Hello” if age is greater
than 20.

=><!DOCTYPE html>

<html>

<head>

<title>Hello Message</title>

<script language="javascript">

function msg()

var age;

age=parseInt(document.f1.t1.value);

if(age>20)

document.write("Hello");
}

</script>

</head>

<body>

<form name="f1">

Enter Age : <input type="text" name="t1"> <br><br>

<input type="button" value="Display Message" onclick="msg()">

</form>

</body>

</html>

17. Write an event driven JavaScript program to display addition and Multiplication of two accepts
numbers when the mouse is moved over a button.

=><!DOCTYPE html>
<html>
<head>
<title>Multiplication & Substraction</title>
<script language="javascript">
function add()
{
var a,b,c;
a=parseInt(form1.t1.value);
b=parseInt(form1.t2.value);
c=a+b;
document.write("Addition is:"+c);
}
function multi()
{
var a,b,c;
a=parseInt(form1.t1.value);
b=parseInt(form1.t2.value);
c=a*b;
document.write("Multiplication is:"+c);
}
</script>
</head>
<body align="center">
<form name="form1">
<h1>Multiplication & Substraction</h1>
First Number:<input type="text"name="t1"><br><br>
Second Number:<input type="text"name="t2"><br><br>
<input type="submit" value="Addition" onmouseover="add()">
<input type="submit" value="Multiplication" onmouseover="multi()">
</form>
</body>
</html>

18. Write an event driven JavaScript program to display Circumference of a circle by accepting radius
from the user. (Circumference=2x3.14xR)

=><!DOCTYPE html>

<html>

<head>

<title>Circumference of Circle</title>

<script type="text/javascript">

function circle()

var r, circum;

r=document.f1.t1.value;

circum=2*3.14*r;

document.write("Circumference of Circle is : "+circum);

</script>

</head>

<body>

<form name="f1">

Enter Radius : <input type="text" name="t1"> <br><br>

<input type="button" value="Circumference" onclick="circle()">


</form>

</body>

</html>

19. Write an event driven JavaScript program to display even number between 50 to 100.

<html>

<head>

<title> </title>

<script language="javascript">

// program to display all even number between given range.

function even()

var ,i;

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

if(i%2==0)

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

</script>

</head>

<body>

<form name="f1">

<input type="button" name="b1" value="Even Numbers" onClick="even()">

</form>

</body>

</html>
20. Write an event driven JavaScript program to display number of character from the accepted string.
<html>
<head>
<title>Length of string</title>
<script language="javascript">
function strlen()
{
var s,l;
s=document.f1.str.value;
l=s.length;
document.write("Length of string is : "+l);
}
</script> </head> <body>
<form name="f1">
Enter the String :<input type="text" name="str"><br>
<input type="button" value="Calculate length" onclick="strlen()">
</form>
</body>
</html>

HTML Program

1. 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>Students Marks</title>
</head>
<body>
<form name="form1"method="POST" action="www.registration.com">
<h1>Students Marks</h1>
Rollno:<input type="number"name="rl"><br>
Unit Test Mark:<input type="number"max="25"name="um"><br>
Terminal Exam Mark:<input type="number"max="50"name="tm"><br>
Subject Teacher Name:<input type="text"><br>
<input type="submit"name="submit"value="Send">
<input type="reset" name="cancel"value="Cancel"><br>
</form>
</body>
</html>

2. Write HTML Program to display names of two departments and also display course like B.Sc., M.Sc.,
B.A, and M.A under department name in unordered list.
=> <!DOCTYPE html>
<html>
<head>
<title>Department</title>
</head>
<body>
<ol type="1">
<li>Arts department</li>
<ul type="desc">
<li>B.A</li>
<li>M.A</li>
</ul>
<li>Science Department</li>
<ul type=" square">
<li>BSC</li>
<li>MSC</li>
</ul>
</ol>
</body>
</html>
3. 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 send to the server.
=> <!DOCTYPE html>
<html>
<head>
<title>Employee</title>
</head>
<body>
<form name="form1"method="POST" action="www.emp_portal.com">
<h1>Employee Details</h1>
Employee Name:<input type="text"name="emp"required><br>
Email ID:<input type="email"name="em"><br>
salary:<input type="number"max="50000"name="sl"><br>
<input type="submit"name="submit"value="Send">
<input type="reset" name="cancel"value="Cancel"><br>
</form>
</body>
</html>

4. Write a HTML Program to display “Cyber World” having Arial font and background color cyan. Add
any two advantages having blue color for the text.
=> <!DOCTYPE html>
<html>
<head>
<title>Cyber World</title>
<style>
body {
background-color: cyan;
font-family: Arial;
}
.advantage {
color: blue;
}
</style>
</head>
<body>
<h1>Cyber World</h1>
<p class="advantage">Advantage 1: Increased connectivity and communication</p>
<p class="advantage">Advantage 2: Access to vast amounts of information</p>
</body>
</html>
5. Write a HTML Program to create an unordered list having names of two students. Add ordered list of
subject they selected as shown below. Sanika 1 IT 2 Maths Sachin 1 Englist 2 PT
=><!DOCTYPE html>
<html>
<head>
<title>Languages</title>
</head>
<body>
<h1>Student Subject List</h1>
<ul type="square">
<li>Sachin</li>
<ol type="1">
<li>English</li>
<li>Physics</li>
<li>Chemistry</li>
<li>Math</li>
<li>IT</li>
</ol>
<li>Sanika</li>
<ol type="i">
<li>Hindi</li>
<li>Physics</li>
<li>Chemistry</li>
<li>Geography</li>
<li>IT</li>
</ol>
</ul>
</body>
</html>
6. Write a HTML Program to create a form to accept students Name, number of practical he has
completed and provide facility to upload his completion certificate.
=> <!DOCTYPE html>
<html>
<head>
<title>Student</title>
</head>
<body>
<form name="form1"method="POST" action="www.student_portal.com">
<h1>Student Details</h1>
Student Name:<input type="text"name="sn"required><br>
Completed Practical:<input type="number"name="pr"><br>
Upload Practical:<input type="file"name="upload"><br>
<input type="submit"name="submit"value="Send">
<input type="reset" name="cancel"value="Cancel"><br>
</form>
</body>
</html>
7. Write a HTML Program to create a list of 3 Flowers in ordered list and list of 3 fruits in unordered list.
=> <!DOCTYPE html>
<html>
<head>
<title>Flower & Fruits</title>
</head>
<body>
<h1>Flowers</h1>
<ol type="1">
<li>Tulip</li>
<li>Rose</li>
<li>Lilly</li>
</ol>
<h1>Fruits</h1>
<ul type="square">
<li>Mango</li>
<li>Apple</li>
<li>Banana</li>
</ul>
</body>
</html>

8. Write a HTML program to create an ordered list having names of two friends. Add unordered list of
their hobbies under each names as shown below.
=> <!DOCTYPE html>
<html>
<head>
<title>Friend</title>
</head>
<body>
<h1>Friend Hobbies</h1>
<ol type="1">
<li>Sachin</li>
<ul type="square">
<li>Cricket</li>
<li>Painting</li>
<li>Swiming</li>
</ul>
<li>Sanika</li>
<ul type="circle">
<li>Reading</li>
<li>Travelling</li>
<li>Singing</li>
</ul>
</ol>
</body>
</html>

9. 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 send to the server.
=><!DOCTYPE html>
<html>
<head>
<title>College</title>
</head>
<body>
<form name="form1"method="POST" action="www.College_Portal.com">
<h1>College Management</h1>
Name Of College:<input type="text"name="ht"required><br>
Number of Student:<input type="number"name="ts"required><br>
Total Halls:<input type="number"name="hall"required min="1"max="100"><br>
<input type="submit"name="submit"value="Send">
<input type="reset" name="cancel"value="Cancel"><br>
</form>
</body>
</html>
10. Write a 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</title>
</head>
<body>
<form name="form1"method="POST" action="www.Hotel_Management.com">
<h1>Hospital Management</h1>
Name Of Hospital:<input type="text"name="ht"required><br>
Email ID:<input type="email"name="mail"required><br>
Bed No.:<input type="number"name="upload"required><br>
<input type="submit"name="submit"value="Send">
<input type="reset" name="cancel"value="Cancel"><br>
</form>
</body>
</html>

11. Write a HTML program to create an ordered list of 3 language uses for speaking and unordered list
having 2 computer languages.
=> <!DOCTYPE html>
<html>
<head>
<title>Languages</title>
</head>
<body>
<h1>Speaking language</h1>
<ol type="1">
<li>English</li>
<li>Spanish</li>
<li>French</li>
</ol>

<h1>Computer Language</h1>
<ul>
<li>Python</li>
<li>PHP</li>
</ul>
</body>
</html>

12. Write a HTML program to display “Digital India” in vardana font using internal CSS. Add any two
sentences about Digital India below in orange color.
=> <!DOCTYPE html>
<html>
<head>
<title>Digital India</title>
<style>
body {
font-family: Verdana;
}
.orange {
color: orange;
}
</style>
</head>
<body>
<h1 style="font-family: Verdana;">Digital India</h1>
<p class="orange">Digital India is a flagship program of the Government of India with a vision to transform India into
a digitally empowered society and knowledge economy.</p>
<p class="orange">The program aims to provide various online services to citizens and improve digital infrastructure
in the country.</p>
</body>
</html>
13. Write a HTML program to accept Email Id of the Hotel, Date of foundation, Number of Tables in Hotel.
The data should be sent to the server.
=><!DOCTYPE html>
<html>
<head>
<title>Hotel</title>
</head>
<body>
<form name="form1"method="POST" action="www.Hotel_Management.com">
<h1>Hotel Management</h1>
Email ID:<input type="email"name="mail"required><br>
Date Of Foundation:<input type="date"name="dt"required><br>
Tables No.:<input type="number"name="upload"required><br>
<input type="submit"name="submit"value="Send">
<input type="reset" name="cancel"value="Cancel"><br>
</form>
</body>
</html>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy