Lesson goal: For loops and plotting the absolute value
Previous: Graph a line in slope-intercept form
| Next: Graph a parabola
Once you learn about absolute values, you may have to make plots of them. They often
result in strange "V-shaped" plots. You can learn how to plot absolute value functions here.
Now you try. Try fixing the
pset statement to plot the variable $x$ on the x-axis and $|x|$ on the y-axis.
Type your code here:
This code will not run. You have to fill in the
y= line to be assigned to the absolute value of x, then
pset statement first. Fix it to plot $x$ on the x-axis, and the $|x|$ on the y-axis.