Ex 05 Mathserver
Ex 05 Mathserver
Star Notifications
README
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 :
math.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Area of right cylinder</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<style type="text/css">
body {
background-color: rgb(175, 199, 243);
}
.edge {
width: 100%;
padding-top: 190px;
text-align: center;
}
.box {
display: inline-block;
border: thick dashed rgb(45, 111, 77);
width: 520px;
min-height: 320px;
font-size: 18px;
background-color: rgb(134, 209, 160);
}
.formelt {
color: black;
text-align: center;
margin-top: 7px;
margin-bottom: 8px;
}
h1 {
color: rgb(98, 68, 162);
padding-top: 25 px;
}
</style>
</head>
<body>
<div class="edge">
<div class="box">
<h1>Surface Area of Right Cylinder</h1>
<h3>Harsshitha lakshmanan (212223230075)</h3>
<form method="POST">
{% csrf_token %}
<div class="formelt">
Radius: <input type="text" name="radius" value="{{r}}">m<br/
</div>
<div class="formelt">
Height: <input type="text" name="height" value="{{h}}">m<br/
</div>
<div class="formelt">
<input type="submit" value="Calculate"><br/>
</div>
<div class="formelt">
Area: <input type="text" name="area" value="{{area}}">m<sup
</div>
</form>
</div>
</div>
</body>
</html>
urls.py
views.py
RESULT:
The program for performing server side processing is completed successfully.
Releases
No releases published
Packages
No packages published
Terms Privacy Security Status Docs Contact Manage cookies Do not share my personal information