I want to use the function f in the function radiationExposure, but this code return nothing.
def f(x):
import math
return 10*math.e**(math.log(0.5)/5.27*x)
def radiationExposure(start, stop, step):
if start < 0 or stop < start or step < 0:
print("Invalid inputs!")
else:
result = 0 # Total radiation exposure area
for i in range(start, stop + 1):
result += f(i)*step
return result
radiationExposure(5, 10, 1)
math.exp(num)thanmath.e**num.