Answered step by step
Verified Expert Solution
Question
1 Approved Answer
My incorrect solution pleasefix my code to get tge correct output for 4,-3. Python 11.17 LAB: Math Function Write a Python program to implement pow(x,
My incorrect solutionpleasefix my code to get tge correct output for 4,-3. Python
11.17 LAB: Math Function Write a Python program to implement pow(x, n) Ex: Input 2,3 Output LAB ACTIVTY 11.17.1: LAB: Math Function 1 class arith): 2 def pow(self, x, n): Add your code Here.''' 4 5 aarith() 6 1[int(i) for i in input("").split(",")] 7 print (a.pow(1[e],1[1]); 8 ACTIVITY 11.17.1: LAB: Math Function 1 class arith(): def pow self, x, n): Add your code Here."" result 1 for i in range(n): 4 5 6 7 result = result * x return result 9 a arith() le 1 = [int (i) for i in input(""), split(",")] 11 print(a.pow(1e],1[1])); 12 1: Compare output A Input 2,2 Your output 4 2: Compare output Ouipuri differs. See highlights below Input 4,-3 Your output 1 Expected output 0.015625Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started