-2
(x**2 - 4*x + 5). Only it needs to calculate the result of this formula for several values of x.
Input format: Two integers, one in each row:
The first number (a) represents the first value of x to be used The second number (b) represents the last value of x to be used
Output format: The results of x**2 - 4*x + 5, for x in the closed interval between a and b in the domain of integers.
Note: the results will always be whole numbers, no rounding is required.
I tried that way, but I didn’t succeed:
x = int(input(''))
x1 = int(input(''))
conta = ((x**2 ) - (4*x) + 5)
conta1 = ((x1**2 ) - (4*x1) + 5)
print(conta)
print(conta1)