I assumed that
print(f'{x:>.2f} {slope:>.2f} {df(x):>.2f}') within a while loop would align the three output variable columns "x", "slope", and "df(x)" in this Trinket (
https://trinket.io/glowscript/0a0592d60d), but no, kinda.
So long as the numbers are exactly the same length, it all lines up, but as soon as they switch sign or increase/decrease the number of integer place holders, it's off. I've tried a few solutions from Stack Exchange etc. but they don't seem to work.
What am I missing?
NOTE: the print output for this Trinket isn't very useful towards it main purpose of comparing a limit process to an analytic answer, but I was just curious about the outputs and it became frustrating to fail at formatting it. A solution would be most helpful in a bunch of other settings.