Created
December 6, 2017 08:37
-
-
Save spaghettiSyntax/ee0d8dc9a1b0f1a823164f10c4053305 to your computer and use it in GitHub Desktop.
Tony Gaddis Python: Temperature Conversion Table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ch_4_jrn8_ex6.py | |
# Celsius to Fahrenheit Table | |
# Print the table headings. | |
print('Farenheit\t Celsius') | |
print('------------------------') | |
# Print the degree comparisons 0-20 Celsius to Farenheit | |
for celsius in range(0, 21): | |
farenheit = 9 / 5 * celsius + 32 | |
print(format(farenheit, '.1f'), '\t\t', celsius) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment