Jan-20-2017, 09:15 PM
You could use the "print" format to pretty much do what you you'd like. For instance you could have this:
That should give you a clue as to how to additionally add content to your print function
For a complete description, refer here: https://docs.python.org/3/tutorial/inputoutput.html
for celsius in range(0, 101, 10): print("The temperature is {} degrees Fahrenheit.".format(9/5 * celsius + 32))Notice the use of the double "{}", this corresponds to the first (and currently only) argument in the .format()
That should give you a clue as to how to additionally add content to your print function
For a complete description, refer here: https://docs.python.org/3/tutorial/inputoutput.html
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition