Contact: aviboots(AT)netvision.net.il
39,961 questions
51,903 answers
573 users
num = 9 sqrt = num ** 0.5 print('The square root of %0.2f is %0.2f' % (num, sqrt)) ''' run: The square root of 9.00 is 3.00 '''
num = 10 sqrt = num ** 0.5 print('The square root of %0.2f is %0.3f' % (num, sqrt)) ''' run: The square root of 10.00 is 3.162 '''
import math n = 16 print(math.sqrt(n)) ''' run: 4.0 '''