MST Word Format
MST Word Format
WEEK 3A
Module Name: Type of
Identifiers
Aim: Write a JavaScript program to find the area of a circle using radius (var and let -
reassign and observe the difference with var and let) and PI (const)
<body>
<script>
const pi=3.14;
</script>
</body>
Output:
WEEK 3B
Module Name: Primitive and Non-Primitive Data Types
Aim: Write JavaScript code to display the movie details such as movie name, starring,
language, and ratings. Initialize the variables with values of appropriate types. Use
<body>
<script>
var star=prompt("starring:");
var rat=prompt("rating:");
var lan=prompt("language:");
document.writeln("<br>movie name:"+mov);
document.writeln("<br>starring name:"+star);
document.writeln("<br>rating:"+rat);
document.writeln("<br>language:"+lan);
</script>
</body>
Output
WEEK 3C
Module Name: Operators and Types of Operators
Aim: Write JavaScript code to book movie tickets online and calculate the total price,
considering the number of tickets and price per ticket as Rs. 150. Also, apply a
<body>
<script type="text/javascript">
var dis=(tot*10)/100;
document.write("Total Amount"+tot+'<br>');
</script>
</body>
Output:
WEEK 3D
Aim: Write a javascript code to book movie tickets online and calculate the total price based
on the 3 conditions: (a) if the seats to be booked are not more than 2, the cost per ticket
remains Rs.150. (b) If seats are 6 or more, booking is not allowed. (C) if seated are about to
less or equal to 6 the total price should to with 10% discount.
Source code:
<html>
<body>
<script>
var n = parseInt(prompt("Enter no.of tickets"));
var totalprice,discount,price;
if((n>0) && (n<=2))
{
totalprice=n*150;
document.writeln("please pay money:Rs",+totalprice+"/");
}
else if((n>2) && (n<=6))
{
price=n*150;
discount=(10*price)/100;
totalprice=price-discount;
document.writeln("please pay money:Rs",+totalprice+"/");
}
else
{
document.writeln("please we can't booking ticket");
}
</script>
</body>
</html>
Output:
WEEK 3E
Module Name: Types of loops
Aim: Write a javascript program for t following a) To print the reverse of the given number.
}
if(n1==s)
{document.writeln("<br>Number is a palindrome ");}
else{document.writeln("<br>Number is not a palindrome ");}
</script>
</body>
Output: