Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Temperature Converter (for all temperatures)
#1
Hey guys I made this for chemistry and I thought I would share
Temperature Converter
Code:
#Credits:
#Nevets04(I can't even count how much of his contributions helped me learn)
#Mr.FeellingLeSS(For the script that clears the shell for XP and Vista)
#Me?

import os
import platform

def clearer():
    systemver=platform.release()
    if systemver=='XP':
        os.system("cls")
    elif systemver=='Vista':
        os.system("clear")
    else:
        os.system("clear")
clearer()

print '***************************** *'
print '*         Welcome!                             '
print '*     To the uber1337                        '
print '*   Temperature Converter                 '
print '******************************'
raw_input('Press Enter to continue')
clearer()
print 'For Farenheit to Celsius, Press:1'
print  'For Farenheit to Kelvin, Press:2'
print 'For Celsius to Farenheit, Press:3'
print    'For Celsius to Kelvin, Press:4'
print    'For Kelvin to Celsius, Press:5'
print  'For Kelvin to Farenheit, Press:6'
x = input('What is it that you want to convert?:')
clearer()
def choice():
    if x==1:
        a = input('Enter your degrees Farenheit here:')
        print (a - 32) * 5/9
    if x==2:
        b = input('Enter your degrees Farenheit here:')
        print (b - 32) * 5/9 + 273
    if x==3:
        c = input('Enter your degrees Celsius here:')
        print c * 9/5 + 32
    if x==4:
        d = input('Enter your degrees Celsius here:')
        print d + 273
    if x==5:
        e = input('Enter your degrees Kelvin here:')
        print e - 273
    if x==6:
        f = input('Enter your degrees Kelvin here:')
        print (f - 273) * 9/5 + 32
choice()
raw_input()
Blackhat
[Image: izsyo6.jpg]


Reply
#2
Thanks dude! Is it ok if I take and customize it into something else thats not a converter.
Good and Bad you Decide.
SupermanDevlish
Reply
#3
Sure! That's what the open source community is all about! Not that it matters but what are you making it into???
[Image: izsyo6.jpg]


Reply
#4
I'm making a script that when you run it in python it opens a tutorial menu for different lessons in python.
Good and Bad you Decide.
SupermanDevlish
Reply
#5
(11-07-2009, 05:26 PM)conrados1 Wrote: I'm making a script that when you run it in python it opens a tutorial menu for different lessons in python.

ooh I like it... a python program that teaches python! lol Yeye
[Image: izsyo6.jpg]


Reply
#6
I couldn't get it so I made one that shows a background in python. Next time I'll make one that teaches python. Smile
Good and Bad you Decide.
SupermanDevlish
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)