4
Refresher lesson- Wordsearch

Refresher 2

Embed Size (px)

Citation preview

Page 1: Refresher 2

Refresher lesson- Wordsearch

Page 2: Refresher 2

What do the following codes do?<html>

<body>

<script type="text/javascript">

var marks = prompt("enter the marks of test","");

marks=parseInt(marks);

if(marks>=60)

{

document.write("grade is a");

}

else if (marks >=45)

{

document.write("grade is b");

}

else

{

document.write("grade is f");

}

</script>

</body>

</html>

Page 3: Refresher 2

<html>

<body>

<script type="text/javascript">

var yr = prompt("enter the year","");

yr=parseInt(yr);

if (yr%4==0 && yr%100!=0 || yr%400==0)

{

document.write ("YEAR",yr,"is a leap year");

}

else

{

document.write ("YEAR", yr," is not a leap year");

}

</script>

</body>

</html>

What do the following codes do?

Page 4: Refresher 2

Make the following code work<html>

<body>

<script type="text/j">

var maxmarks = prompt("enter the max marks of test","");

var marks = prompt("enter the marks of test","");

maxmarks=p(maxmarks);

marks=parseInt(marks);

var percen=marks/maxmarks*100

if(percen>80)

{

document.write("you have",percen,"% in this test");

document.write("<PRE>\nCongratulations for your performance </PRE>");

}

else

{

document.write ( you need to work a little more for excellence");

document.write ("<PRE>\nPlan better and you will be there</PRE>");

}

</script>

</body>

</html>