Open jonititan opened 5 years ago
I have had feedback from other instructors that this change and indeed the use of .format() on strings is too high level for this lesson. I can certainly see that argument but the more I read this lesson with the other Python programming lesson the more I see there is a high degree of overlap with python-novice-inflammation
I think format strings are great, and definitely something to point learners at as a "would you like to learn more...".
Thoughts from other maintainers?
Plotting within python using pyplot includes some very powerful functions useful to scientists and engineers. One in particular which I have found excellent for improving the readability of my plots and also for formatting of data into strings and messages is the EngFormatter function. It is a tick formatter in pyplot and has the obvious benefits shown for improving intelligibility of plots. It can be used outside of the plot figure environment to format numbers for strings in the following way.
from matplotlib.ticker import EngFormatter
formatter_freq = EngFormatter(unit='Hz')
print("Frequency is {}".format(formatter_freq(1000000)))
result is "Frequency is 1 MHz"
If this would be a welcome change I can work in an update to submit. I think it would fit best in chapter 9.