Skip to content

Instantly share code, notes, and snippets.

@spaghettiSyntax
Created December 6, 2017 08:37
Show Gist options
  • Save spaghettiSyntax/ee0d8dc9a1b0f1a823164f10c4053305 to your computer and use it in GitHub Desktop.
Save spaghettiSyntax/ee0d8dc9a1b0f1a823164f10c4053305 to your computer and use it in GitHub Desktop.
Tony Gaddis Python: Temperature Conversion Table
# 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