Good day! Please tell me how to check the value when you enter n. When n> 20, the program should stop. He did all sorts of permutations with the cycle and if, nothing good happened. Task for Horner's Scheme ( problem condition ) And here is what I got:
n = int(input()) x = float(input()) i = 0 i = float(i) while n >= 0 and n < 21: coef = float(input()) n = n - 1 i = i + coef i = i * x if n == 0: break else: pass coef = float(input()) i = i + coef print(i)