Posts

Ex.No. #3 EXPONENTIATION OF A NUMBER (English)

Image
Ex. No. : 03    EXPONENTIATION OF A NUMBER Aim: To write a Python program to find the exponentiation of a number. Program: b=int(input(" Enter the base value : "))                    5 e=int(input(" Enter the power : "))                            3 p=1 for i in range(e):         0,1,2    0           i=1                                i=2                           ...

How to draw Mickey Mouse - Easy step-by-step drawing lessons for kids

Image

How to Draw Shisimaru Step by step | Ninja Hattori

Image

Square Root Newton's Method (Tamil)

Image
Aim: To write a Python Program to find the square root of a number by Newton ’ s Method. Algorithm: 1.Define a function named newtonSqrt(). 2.Initialize approx as 0.5*n and better as 0.5*(approx.+n/approx.) 3.Use a while loop with a condition better!=approx to perform the following, i. Set approx.=better ii. Better=0.5*(approx.+n/approx.) 4.Print the value of approx Program: def newtonSqrt(n):     approx = 0.5 * n     better = 0.5 * (approx + n/approx)     while better != approx:         approx = better         better = 0.5 * (approx + n/approx)     return approx print('The square root is' ,newtonSqrt(3))