diff --git a/README.md b/README.md index dc16b8e1..3d32ae9f 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,118 @@ To design a website to perform mathematical calculations in server side. Publish the website in the given URL. ## PROGRAM : - +~~~ html +urls.py:- + +from django.contrib import admin +from django.urls import path +from mathapp import views + +urlpatterns = [ + path('admin/', admin.site.urls), + path('volofrectangulartank/',views.volumecalculation,name="volofrectangulartank"), + path('',views.volumecalculation,name="volofrectangulartankroot") +] + + +views.py:- + +from django.shortcuts import render + +def volumecalculation(request): + context ={} + context["volume"]='0' + context["h"]='0' + context["l"]='0' + context["w"]='0' + if request.method == 'POST': + + h=request.POST.get('height','0') + l=request.POST.get('length','0') + w=request.POST.get('width','0') + volume=int(h)*int(l)*int(w) + context['volume'] = volume + context['l']=l + context['h']=h + context['w']=w + return render(request,"mathapp/area.html",context) + + +html Code:- + + + + + + + Page Title + + + + + +
+

VOLUME OF RECTANGULAR TANK

+
+ {% csrf_token %} +
+ Height:
+
+
+ Length:
+
+
+ Width:
+
+
+
+
+
+ Volume: +
+
+
+ + +~~~ ## OUTPUT: - -### Home Page: - +![](sv46) ## Result: