Sign in
kaifjr / MathServer Public
forked from dr-pvijayan/MathServer
Code Pull requests Actions Projects Security Insights
Files main MathServer / [Link]
kaifjr Update [Link] now
101 lines (83 loc) · 2.89 KB
Preview Code Blame Raw
Ex.05 Design a Website for Server Side
Processing
Date:
AIM:
To design a website to find surface area of a Right Cylinder in server side.
FORMULA:
Surface Area = 2Πrh + 2Πr2
r --> Radius of Right Cylinder
h --> Height of Right Cylinder
DESIGN STEPS:
Step 1:
Clone the repository from GitHub.
Step 2:
Create Django Admin project.
Step 3:
Create a New App under the Django Admin project.
Step 4:
Create python programs for views and urls to perform server side processing.
Step 5:
Create a HTML file to implement form based input and output.
Step 6:
Publish the website in the given URL.
PROGRAM :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
input{
border-radius: 30px;
text-align: center;
}
body {
background-color :pink;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
</style>
</head>
<body name="body" id="body">
<script>
let number=['0','1','2','3','4','5','6','7','8','9','a','b','c','d'
function changeColor(){
hexcode='';
for(let i=0;i<6;i++){
random1=[Link]([Link]()*[Link]);
hexcode+=number[random1];
}
hexcode="#"+hexcode;
let b=[Link]('body');
[Link]=hexcode;
}
setInterval('changeColor()',100);
function check(){
radius=[Link]('radius').value;
height=[Link]('height').value;
result=[Link]('result');
area = 2*(3.14)radius*height + 2(3.14)*radius*radius;
[Link] = area;
}
</script>
<center>
<h1>Surface Area of Cylinder</h1>
<h3>KAIFMOHAMED.P(212222043004)</h3>
<h2>Radius : <input size="30px" type="text" name="radius" id="radi
Height : <input type="text" size="30px" name="height" id="height" p
<button type="button" onclick="check()">AREA</button> <br> <br>
Output : <input type="text" size="30px" name="result" id="result" p
</center>
</body>
</html>
SERVER SIDE PROCESSING:
HOMEPAGE:
RESULT:
The program for performing server side processing is completed successfully.