Respuesta :
Answer:
Answer explained
Explanation:
From the previous question we know that while searching for n^(1/r) we don't have to look for guesses less than 0 and greater than n. Because for less than 0 it will be an imaginary number and for rth root of a non negative number can never be greater than itself. Hence lowEnough = 0 and tooHigh = n.
we need to find 5th root of 47226. The computation of root is costlier than computing power of a number. Therefore, we will look for a number whose 5th power is 47226. lowEnough = 0 and tooHigh = 47226 + 1. Question that should be asked on each step would be "Is 5th power of number < 47227?" we will stop when we find a number whose 5th power is 47226.
This exercise can be solved with computer language code in python like this:
in the attached image.
So making it easier we find the code in python like:
lowEnough = input("What is your Low number?")
user_age = int(lowEnough)
as_string = str(user_age)
print("Your number is: " + as_string)
tooHigh = input("What is your high number?")
user_age2 = int(tooHigh)
as_string2 = str(user_age2)
print("Your number is: " + as_string2)
See more about python at brainly.com/question/26104476
