Question: Q3: Write a Python program which creates and prints a list of the square roots of the integers from 44 to 70(Both included), each rounded



Q3: Write a Python program which creates and prints a list of the square roots of the integers from 44 to 70(Both included), each rounded to 3 decimal places. Sample expected outputs of your program: Square roots of the integers from 44 to 70: [6.633, 6.708, 6.782, 6.856, 6.928, 7.0, 7.071, 7.141, 7.211, 7.28, 7.348, 7.416, 7.483, 7.55, 7.616, 7.681, 7.746, 7.81, 7.874, 7.937, 8.0, 8.062, 8.124, 8.185, 8.246, 8.307, 8.367] Note : You may use the sqrt fucntion in the math module. In [15] : 1 # Q3 Solution 2 from math import sqrt 3 import math 4 5 L [] 6 for i in range(44,71): 7 L.append(i) 8 sqrt(i) 9 #print(math.sqrt(L)) 10 11 print('Square roots of the integers from 44 to 70:',L) 12 Square roots of the integers from 44 to 70: (44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61 , 62, 63, 64, 65, 66, 67, 68, 69, 70] Q5: Write a python code using for loop to determine the sum of the first 10 terms in the series 2k^3, for k = 1, 2, 3, 10 and display the result.. In [2]: 1 # Q5 Solution 2 sums=0 3 for i in range(1,11,1) 4 15125 Q8: A worker is paid according to his hourly wage up to 40 hours, and 50% more for overtime. Write a python code that calculates the pay to a worker. The code asks the user to enter the number of hours and the hourly wage. The code then displays the pay. ]: 1 # 08 Solution 2 t=float(input('please enter the number of hours worked')) 3 h=float(input('please enter the hourly wage in $')) 4 pay=0 5 if t>40: 6 pay=pay+(t-40)*0.5*h 7 print("The worker is pay is", pay) 8 else: 9 pay=h*t 10 print (pay) 11 12 13 14 #Answer: 15 16 #please enter the number of hours worked43 17 #please enter the hourly wage in $10 18 #The worker pay is 445.0 $
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
