diff --git a/README.md b/README.md index 5b8955b4..e0407ad6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Ex.05 Design a Website for Server Side Processing -# Date: +# Date:30/10/2024 # AIM: To design a website to calculate the power of a lamp filament in an incandescent bulb in the server side. @@ -29,7 +29,112 @@ Create a HTML file to implement form based input and output. Publish the website in the given URL. # PROGRAM : +``` + + + + + + POWER OF LAMP IN INCANDESCENT BULD + + + + + +
+
+

POWER OF LAMP IN INCANDESCENT BULB

+
+ {% csrf_token %} +
+ Intensity : (in A)
+
+
+ Resistence : (in Ω)
+
+
+
+
+
+ Power : W
+
+
+
+
+ + + +``` # SERVER SIDE PROCESSING: +``` +def powerlamp(request): + context={} + context['Power'] = "" + context['I'] = "" + context['R'] = "" + if request.method == 'POST': + print("POST method is used") + I = request.POST.get('Intensity','') + R = request.POST.get('Resistence','') + print('request=',request) + print('Intensity=',I) + print('Resistence=',R) + Power = int(I) * int(I) * int(R) + context['Power'] = Power + context['I'] = I + context['R'] = R + print('Power=',Power) + return render(request,'experiment5.html',context) +``` # HOMEPAGE: +![EXPERIMENT 5 SS](https://github.com/user-attachments/assets/6747ce37-3e82-4515-8456-38d6e95a8968) +# OUTPUT: + +![EXPERIMENT 5 SS (1)](https://github.com/user-attachments/assets/21afc962-b6e2-4248-9497-75f6831b48f1) + # RESULT: The program for performing server side processing is completed successfully.