Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Missing Assignments

Views: 711
Kernel: Python 3 (Anaconda 5)
#Ex 2: #a) Calculate, 5^2 ,√25 using the A∗∗B syntax A = 5**2 print(A) B = 25**0.5 print(B)
25 5.0
#b) Calculate: (5 + (5^2 − 4 × 8 × 3))/(2 × 8) a = (5+ (5**2 - 4*8*3))/(2*8) print(a)
-4.125
#c write a program for solving quadratic equations a = 47.2 b = -148.1 c = 72.6 x1 = (-b+(b**2-4*a*c)**0.5)/(2*a) x2 = (-b-(b**2-4*a*c)**0.5)/(2*a) print(x1) print(x2) #run for seperate values of a,b,c a = -19 b = -67 c = 82 x1 = (-b+(b**2-4*a*c)**0.5)/(2*a) x2 = (-b-(b**2-4*a*c)**0.5)/(2*a) print(x1) print(x2)
2.529675032132938 0.6080368322738411 -4.487954260606605 0.9616384711329203