Department of Computer Science and Engineering
Department of Computer Science and Engineering
Department of Computer Science and Engineering
Department Vision an
VISION
To build a center for imparting quality technical education and carrying out research activity to meet
MISSION
The computer science and engineering department strives for excellence in teaching, applying, promoting and imparting kn
Train students to effectively apply the knowledge to solve real-world problems, thus enhance their potential for a life-long
Prepare students to demonstrate a sense of societal and ethical responsibilities in their professional endeavors.
Creating amongst students and faculty a collaborative environment, open to the free exchange of ideas, which leads to rese
Program Educational Objectives
PROGRAM OUTCOMES
PO's PO Description
Engineering knowledge: Apply the knowledge of mathematics, science, engineering
PO1 fundamentals, and an engineering specialization to the solution of complex engineering
problems.
Problem analysis: Identify, formulate, review research literature, and analyze Complex
PO2 engineering problems reaching substantiated conclusions using first principles of mathematics,
natural sciences, and engineering sciences.
Design/development of solutions: Design solutions for complex engineering
problems and design system components or processes that meet the specified needs
PO3
with appropriate consideration for the public health and safety, and the cultural, societal, and
environmental considerations.
Conduct investigations of complex problems: Use research-based knowledge and research
PO4 methods including design of experiments, analysis and interpretation of data, and synthesis
of the information to provide valid conclusions.
Modern tool usage: Create, select, and apply appropriate techniques, resources, and
PO5 modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
The engineer and society: Apply reasoning informed by the contextual knowledge to assess
PO6 societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.
Environment and sustainability: Understand the impact of the professional engineering
PO7 solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.
Ethics: Apply ethical principles and commit to professional ethics and responsibilities
PO8
and norms of the engineering practice.
Individual and team work: Function effectively as an individual, and as a member or leader in
PO9
diverse teams, and in multidisciplinary settings.
Communication:Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as,being able to comprehend and
PO10
write effective reports and design documentation, make effective presentations, and give and
receive clear instructions.
Project management and finance: Demonstrate knowledge and understanding of
the engineering and management principles and apply these to one’s own work, as a
PO11
member and leader in a team, to manage projects and in multidisciplinary environments.
Life-long learning: Recognize the need for, and have the preparation and ability to engage in
PO12 independent and life-long learning in the broadest context of technological change.
CERTIFICATE
Signature of HOD
WEB TECHNOLOGY LABORATORY WITH MINI PROJECT 17CSL77
9. Write a PHP program named states.py that declares a variable states with value
"Mississippi Alabama Texas Massachusetts Kansas". write a PHP program that does the
following:
a. Search for a word in variable states that ends in xas. Store this word in element 0
of a list named statesList.
b. Search for a word in states that begins with k and ends in s. Perform a case-
insensitive comparison. [Note: Passing re.Ias a second parameter to method
compile performs a case-insensitive comparison.] Store this word in element1 of
statesList.
c. Search for a word in states that begins with M and ends in s. Store this word in
element 2 of the list.
d. Search for a word in states that ends in a. Store this word in element 3 of the list.
10. Write a PHP program to sort the student records which are stored in the database using
selection sort.
Course objectives: This course will enable students to
1. Design and develop static and dynamic web pages.
2. Familiarize with Client-Side Programming, Server-Side Programming, Active server
Pages.
3. Learn Database Connectivity to web applications
Develop a web application project using the languages and concepts learnt in the theory and
exercises listed in part A with a good look and feel effects. You can use any web technologies
and frameworks and databases.
Note:
1. In the examination each student picks one question from part A.
2. A team of two or three students must develop the mini project. However during
the examination, each student must demonstrate the project individually.
3. The team must submit a brief project report (15-20 pages) that must include the
following
a. Introduction
b. Requirement Analysis
c. Software Requirement Specification
d. Analysis and Design
e. Implementation
f. Testing
1. All laboratory experiments from part A are to be included for practical examination.
2. Mini project has to be evaluated for 30 Marks.
3. Report should be prepared in a standard format prescribed for project work.
4. Students are allowed to pick one experiment from the lot.
5. Strictly follow the instructions as printed on the cover page of answer script.
6. Marks distribution:
a. Part A: Procedure + Conduction + Viva: 09 + 42 +09 =60 Marks
b. Part B: Demonstration + Report + Viva voce = 20+14+06 = 40 Marks
Change of experiment is allowed only once and marks allotted to the procedure part to be
made zero
WEB TECHNOLOGY LABORATORY WITH MINI PROJECT 17CSL77
Index
Page Marks Staff
Experiment Number allotted Sign
1. Write a JavaScript to design a simple calculator to perform the 5-6
following operations: sum, product, difference and quotient.
2. Write a JavaScript that calculates the squares and cubes of the numbers 7-8
from 0 to 10 and outputs HTML text that displays the resulting values
in an HTML table format.
3. Write a JavaScript code that displays text “TEXT-GR OWING” with 9-10
increasing font size in the interval of 100ms in RED COLOR, when the
font size reaches 50pt it displays “TEXT-SHRINKING” in BLUE color.
Then the f ont size decreases to 5pt.
4. Develop and demonstrate a HTML5 file that includes JavaScript script 11-12
that uses functions for the following problems:
a. Parameter: A string
b. Output: The position in the string of the left-most
c. Parameter: A number
d. Output: The number with its digits in the reverse order
5. Design an XML document to store information about a student in an 13-14
engineering college affiliated to VTU. The information must include
USN, Name, and Name of the College, Branch, Year of Joining, and
email id. Make up sample data for 3 students. Create a CSS style sheet
and use it to display the document.
6. Write a PHP program to keep track of the number of visitors visiting 15-16
the web page and to display this count of visitors, with proper
headings.
7. Write a PHP program to display a digital clock which displays the current 17-18
time of the server.
8. Write the PHP programs to do the following: 19-22
a. Implement simple calculator operations.
b. Find the transpose of a matrix.
c. Multiplication of two matrices.
d. Addition of two matrices.
9. Write a PHP program named states.py that declares a variable states 23-24
with value "Mississippi Alabama Texas Massachusetts Kansas". write a
PHP program that does the following:
a. Search for a word in variable states that ends in xas. Store this word
in element 0 of a list named states List.
b. Search for a word in states that begins with k and ends in s. Perform
a case-insensitive comparison. [Note: Passing re.Ias a second
parameter to method compile performs a case-insensitive
comparison.] Store this word in element1 of states List.
c. Search for a word in states that begins with M and ends in s. Store
this word in element 2 of the list.
d. Search for a word in states that ends in a. Store this word in
element 3 of the list.
10. Write a PHP program to sort the student records which are stored in 25-27
the database using selection sort.
1. Write a JavaScript to design a simple calculator to perform the following operations: sum,
product, difference and quotient.
Program
<html>
<title>CALCULATOR</title>
<style>
input{ width:100%; padding:30px; } input:hover{background: silver;}
</style>
<body>
<div align="center">
<h2>SIMPLE CALCULATOR</h2>
<script type="text/javascript">
a = ['7','8','9','+','4','5','6','-','1','2','3','*','c','0','=','/']
z = '<td> <input type="button" value="'
document.write('<form name="cal"><table><tr><td colspan="8">
<input type="text" name="get"></td></tr><tr>');
for (var i = 0; i<16; i++) {
if(i==12){
document.write('<td> <input type="reset" value="c" ></td>'); continue ;}
if(i==14){
document.write('<td><input type="button"
value="=" onclick="cal.get.value =eval(cal.get.value)"></td>');continue ;}
if(i==3||i==7||i==11){
document.write(z+a[i]+'" onclick="cal.get.value +=\''+a[i]+'\'"></td></tr><tr
rowspan="2">');
continue ;}
else
document.write(z+a[i]+'" onclick="cal.get.value +=\''+a[i]+'\'"></td>');
}
document.write('</table></form></div>');
</script>
</body>
</html>
Program No. 2
2. Write a JavaScript that calculates the squares and cubes of the numbers from 0 to 10 and
outputs HTML text that displays the resulting values in an HTML table format.
Program
<html>
<head><title> Squares and Cubes </title></head>
<script >
</html>
WEB TECHNOLOGY LABORATORY WITH MINI PROJECT 17CSL77
Program No. 3
3. Write a JavaScript code that displays text “TEXT-GROWING” with increasing font size in
the interval of 100ms in RED COLOR, when the font size reaches 50pt it displays “TEXT-
SHRINKING” in BLUE color. Then the font size decreases to 5pt..
Program
<!DOCTYPE html>
<html>
<body>
<div id="h"></div>
<script>
var v = 0, f = 1,t="TEXT-GROWING",color;
function a(){
if(f==1) v+=5,color="red"; else v-=5,color="blue";
document.getElementById("h").innerHTML =
"<h1 style=\"font-size: "+v+"px ; margin: 0px;
color : "+color+"\"><b> "+t+"</b></h1>";
if(v==50) f = 0,t="TEXT-SHRINKING";
if(v==5) f = 1,t="TEXT-GROWING";
c();
}
Department of Computer Science and Engineering, Sir Page 10
MVIT
WEB TECHNOLOGY LABORATORY WITH MINI PROJECT 17CSL77
function c(){ setTimeout(a,300); }
c();
</script>
</body>
</html>
Program No. 4
4. Develop and demonstrate a HTML5 file that includes JavaScript script that uses functions
for the following problems:
a. Parameter: A string
b. Output: The position in the string of the left-most
c. Parameter: A number
d. Output: The number with its digits in the reverse order
Program
<script>
var a = prompt("Enter The Query"),b = parseInt(a),z=0;
if(b) {
while(b>0)
var r= b%10, z= z*10+r, b = Math.floor(b/10);
document.write("Entered Query : "+ a +"<br> Given Number In Reverse
Order : "+ z);
}
else {
a = a.search(/[aeiouAEIOU]/);
document.write("The First Occurence Of Vowel is at : "+ (a+1));
}
</script>
Program
Prog5.css:
*{
display: block; font-size: 20px;
}
USN {
color: blue;
font-size: 30px;
margin-top: 20px;
}
Prog5.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="PROG5.css"?>
<STUDENTDATA>
<STUDENT>
<USN>USN : 1MV17CS127</USN>
<NAME>NAME : Sunchit Lakhanpal</NAME>
<COLLEGE>COLLEGE : MVIT</COLLEGE>
<BRANCH>BRANCH :CSE</BRANCH>
<YEAR>YEAR : 2020</YEAR>
<EMAIL>E-MAIL : [email protected]</EMAIL>
</STUDENT>
<STUDENT>
<USN>USN : 1MV17CS129</USN>
<NAME>NAME : KUSHAL PALA</NAME>
<COLLEGE>COLLEGE : MVIT</COLLEGE>
<BRANCH>BRANCH :CSE</BRANCH>
<YEAR>YEAR : 2020</YEAR>
<EMAIL>E-MAIL : [email protected]</EMAIL>
</STUDENT>
<STUDENT>
<USN>USN : 1MV17CS126</USN>
<NAME>NAME : DIMPLE</NAME>
<COLLEGE>COLLEGE : MVIT</COLLEGE>
<BRANCH>BRANCH :CSE</BRANCH>
<YEAR>YEAR : 2020</YEAR>
<EMAIL>E-MAIL : [email protected]</EMAIL>
</STUDENT>
</STUDENTDATA>
WEB TECHNOLOGY LABORATORY WITH MINI PROJECT 17CSL77
Program No. 6
6. Write a PHP program to keep track of the number of visitors visiting the web page and to
display this count of visitors, with proper headings
Program
<?php
echo "<h1> REFRESH PAGE </h1>" ;
$file = 'count.txt' ;
$c = file_get_contents($file) ;
file_put_contents($file, $c+1);
echo "The number of users visited : ".$c ;
?>
Program No. 7
7. Write a PHP program to display a digital clock which displays the current time of the server.
Program
<head>
<meta http-equiv="refresh" content="1"/>
<style>
p{
color:yellow;
font-size:90px;
position:absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
}
body {
background-color:maroon;
}
</style>
<p> <?php echo date(" h: i : s A");?> </p>
</head>
Program No. 8
Program
CALCULATOR:
<html>
<head>
<style>
table, td, th {
border: 1px solid black;
width: 35%;
text-align: center;
background-color: lightgray;
}
table { margin: auto; }
input,p { text-align:right; }
</style>
</head>
<body>
<form method="post" action="prog8a.php">
<table>
Department of Computer Science and Engineering, Sir Page 21
MVIT
WEB TECHNOLOGY LABORATORY WITH MINI PROJECT 17CSL77
<!DOCTYPE html>
<html>
<body>
<?php
function pr($a){
foreach ($a as $b) {
foreach ($b as $c) {
echo $c ." ";
}echo "<br>";
}echo "<br>";
}
$a = [[1,2,3],[4,5,6],[7,8,9]];
$b = [[7,8,9],[4,5,6],[1,2,3]];
echo "<b>First Matrix : </b><br>" ; pr($a);
echo "<b>Second Matrix : </b><br>"; pr($b);
for ($i=0; $i < 3; $i++)
for ($j=0; $j < 3; $j++)
$c[$i][$j] = $a[$j][$i];
echo "<b>Transpose Of First Matrix : </b><br>"; pr($c);
for ($i=0; $i < 3; $i++)
for ($j=0; $j < 3; $j++)
$c[$i][$j] = $a[$i][$j] + $b[$i][$j];
echo "<b>Addition Of Two Matrix : </b><br>"; pr($c);
for ($i=0; $i < 3; $i++)
for ($j=0; $j < 3; $j++){
$c[$i][$j] = 0;
for ($k=0; $k < 3; $k++)
$c[$i][$j] += $a[$i][$k] * $b[$k][$j];
}
echo "<b>Multiplication Of Two Matrix : </b><br>"; pr($c);
?>
</body>
</html>
WEB TECHNOLOGY LABORATORY WITH MINI PROJECT 17CSL77
Program No. 9
9. Write a PHP program named states.py that declares a variable states with value
"Mississippi Alabama Texas Massachusetts Kansas". write a PHP program that does the
following:
a. Search for a word in variable states that ends in xas. Store this word in element 0 of
a list named states List.
b. Search for a word in states that begins with k and ends in s. Perform a case-insensitive
comparison. [Note: Passing re.Ias a second parameter to method compile performs a
case-insensitive comparison.] Store this word in element1 of states List.
c. Search for a word in states that begins with M and ends in s. Store this word in
element 2 of the list.
d. Search for a word in states that ends in a. Store this word in element 3 of the list
Program:
<html>
<body>
<?php
$states = "Mississippi Alabama Texas Massachusetts Kansas";
$b = explode(' ',$states);
echo "<br>ORIGINAL ARRAY :<br>";
foreach ( $b as $i => $value )
echo "states[$i] = $value<br>";
foreach ($b as $c)
{
$n = strlen($c);
if($c[$n-1]=='s' && $c[$n-2]=='a' && $c[$n-3]=='x') $d[0] = $c;
if($c[0]=='K' && $c[$n-1]=='s') $d[1] = $c;
if($c[0]=='M' && $c[$n-1]=='s') $d[2] = $c;
if($c[$n-1]=='a') $d[3] = $c;
}
echo "<br>RESULTANT ARRAY :<br>";
for ($i=0; $i < count($d); $i++)
echo "statesList[$i] = $d[$i]<br>";
?>
</body>
</html>
Program No. 10
10. Write a PHP program to sort the student records which are stored in the database using
selection sort.
Program
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "weblab";
$conn = mysqli_connect($servername, $username, $password, $dbname);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELECT * FROM student";
$result = $conn->query($sql);
$usn = array() ;
echo "<table border='2'><caption>Before Sorting </caption><br>";
echo "<tr><th>USN</th><th>NAME</th><th>Marks</th></tr>";
if ($result->num_rows > 0)
{
while($row = $result->fetch_assoc())
{
echo "<tr><td>". $row["usn"]."</td>";
echo "<td>". $row["name"]."</td>";
echo "<td>". $row["marks"]."</td></tr>";
$usn[] = $row["usn"] ;
}
}
$n = sizeof($usn) ;
for($i = 0 ; $i < $n-1 ; $i++ )
{
$pos = $i ;
for($j = $i + 1 ; $j < $n ; $j++ )
{
if( $usn[$pos] < $usn[$j])
{
$pos = $j ;
}
}
LAB EVALUATION
1MV17CS127
USN : SEMESTER / SECTION : 7 /B
SUNCHIT LAKHANPAL
STUDENT NAME :