Question: Execute the code provided below and then use the python debugger to determine the value of i in func 2 when the code crashes.import numpy

Execute the code provided below and then use the python debugger to determine the value of i in func2 when the code crashes.import numpy as np
def func1(a, b):
return (a + b)/(a - b)
def func2(size):
digits = np.random.randint(0,9, size=size)
for i in range(digits.size -1):
a = int(digits[i])
b = int(digits[i +1])
ans = func1(a, b)
func2(1000)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!