Objective
Create a program Python to display certain values of the function y= x2 - 2x + 1. Ask the user for the range of integers x to show the function.
Instructions
- Ask the user for the range of integer numbers x.
- Calculate the values of the function (y= x2 - 2x + 1) for each x in the range.
- Display the results of the function for each x.
-10
10
121 100 81 64 49 36 25 16 9 4 1 0 1 4 9 16 25 36 49 64 81
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise