Web 2017 Old paper Solutions || BIM STUDY NOTES

3rd Semester

Year 2017 

checkout question in question paper section.
//Q.no 11 

<html>
<head>
<style>
table
{
border:1px solid black;
border-collapse:collapse;
}
</style>
</head>
<body>
<table border="width:50%">
<tr>
<th colspan="2">Subject</th>
<th> John Doe</th>
<th>Mirim Luther</th>
</tr>
<td rowspan="2"><b>Biology</b></td>
<td><b>Practical</b></td>
<td> A</td>
<td>A</td>
</tr>
<tr>
<td><b> Theory</b></td>
<td>A+</td>
<td> A</td>
</tr>
<tr>
<td rowspan="2"><b>Chemistry</b></td>
<td><b>Practical</b></td>
<td>B</td>
<td>C</td>
</tr>
<tr>
<td><b>Theory</b></td>
<td>A</td>
<td>C+</td>
</tr>
<tr>
<td rowspan="2"><b>Physics</b></td>
<td><b>Practicals</b></td>
<td>A </td>
<td>A</td>
</tr>
<tr>
<td><b> Theory</b></td>
<td>A-</td>
<td>A-</td>
</tr>
</table>
</body>
</html>




Q.no 12

<html>
	<head>
		<title>Divs</title>
		<style type="text/css">
			.main{border:2px solid black; height:500px;width:1000px;}
			.fr{height:100px;width:1000px;border-bottom:2px solid black;}
			.fr1{height:100px;width:800px;border-right:2px solid black;float:left;}
			.fr2{height:100px;width:200px;float:right;}
			.sr{height:300px;width:1000px;border-bottom:2px solid black;}
			.sr1{height:300px;width:200px;border-right:2px solid black;float:left;}
			.sr2{height:300px;width:800px;float:right;}
			.tr{height:100px;width:1000px;}
		</style>
	</head>
	<body>
		<div class="main">
			<div class="fr">
				<div class="fr1"></div>
				<div class="fr2"></div>
			</div>
			<div class="sr">
				<div class="sr1"></div>
				<div class="sr2"></div>
			</div>
			<div class="tr"></div>
		</div>
	</body>
</html>



Q.no 13 Write a JavaScript function that takes two strings as arguments and checks them for equality. If both the strings are equal then display the first string in uppercase else return “the two strings do not match”.

<html>
	<head>
		<title>String 4</title>
	</head>
	<body>
	<script type="text/Javascript"		str1=new String("BIM Study Notes"); var a1=str1.length;
str2=new String("BIM Study Notes"); var a2=str2.length;
	var i;
	var count=0;
	for(i=0;i<=a1;i++)
		{
			if(str1.charAt(i)!=str2.charAt(i))
		{
				count++;
					break;
				}
		}
		if(count==0)
		{
document.write("<br>Uppercase is: "+str1.toUpperCase());
	}
else document.write("<br>They are not equal");
		</script>
	</body>
</html>
 

 



Q.no 14

Checkout question in question section.
</html>
<body>
<form>
<pre> Agent Name: <input type="textbox" size=10 name="fname"><input type="textbox" size=10 name="mname"><input type="textbox" size=10 name="surname">
Address: <input type="textbox" size=40 name="address">
Agent Type: <input type="radio" value="Individual">Individual <input type="radio" value= "Organization">Organization
Country: <select name="country">
<option value=0 selected> (Please select a country)
</option><option value="Nepal">Nepal</option>
<option value="China">China</option>
</select>
Email: <input type="textbox" size=40 name="email">
<input type="checkbox" name="confirm">I, here by, declare that all the information provided are correct.
<input type="submit" value="Submit"><input type="reset" value="Restet">
</form>
</body>

Q.no 15 Write a program in JavaScript to add two prime numbers only.

<html>
<head>
<title>Primes</title>
<script type="text/Javascript">
var a=prompt ("Enter 1st num: ");
var b=prompt ("Enter 2nd num: ");
var i, j, flag1=0, flag2=0;
for (i=2;i<a/2;i++)
{
if(a&i==0)
{
flag1=1;
break;
}
}
for(j=2;j<b/2;j++)
{
if (b%j==0)
{
flag2=1;
break;
}
}
if(flag1==0&&flag2==0) {
var sum=parseInt(a) +parseInt (b);
document.write("Sum is: "+sum) ;
else
{
document.write ("Not prime numbers!!"); }
</script>
</head>




Leave a Reply

Your email address will not be published.