Temperature conversion
I wrote both of these in about ΒΌ hour, convert from Celcius to Kelvin, and Kelvin to Celcius
#!/usr/bin/env python3
#
# Cel2Kel.py
# https://www.metric-conversions.org/temperature/celsius-to-kelvin.htm
import sys
print("celcius to Kelvin Converter")
print("Please enter value in Celcius")
tempc= input()
#print (tempc)
print ("conveted to Kelvin")
kelvin = int(tempc) + 273.15
print (kelvin)
sys.exit()
#!/usr/bin/env python3
import sys
print("Kelvin to Celcius Converter")
print("Please enter value in Kelvin")
tempk = input()
#print (tempk)
print ("conveted to Celcius")
kelvin = int(tempk) - 273.15
print (kelvin)
sys.exit()
They work, and do the job intended, as I have zero interest in coding they are not written to reflect coding proficiency.
| Mastodon | ShellLabs | Join Mastodon |