You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

22 rivejä
593 B

#!/usr/bin/env python3
#title :6-1.py
#description :Opdracht 6.1 - Formatting
#author :Marcel Haazen
#email :marcel@haazen.xyz
#date :23-09-2019 - 13:38
#version :0.1
#usage :python3 6-1.py
#notes :
#python_version :3.7.4
#==============================================================================
def convert(c):
f = 9.0/5.0 * c + 32.0
return f
def table(start,stop,step):
print('%-12s%-12s' % ("F", "C"))
for n in range(start,stop,step):
print('%-12.2f%-12.2f' % (convert(n), n))
table(-30,41,10)