Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some of my first python scripts
#1
Found these lying around in a flash drive I was clearing out and I thought I would share Victoire
Celsius to Fahrenheit
Code:
Celsius = input('Input your celsius degrees here:')
Fahrenheit = Celsius * 9/5 + 32
print Fahrenheit
raw_input( ) #keeps it open in windows

Order 3 Numbers
Code:
one = input('Insert a number')
two = input('and another')
three = input('once more')
L = [one, two, three]
L.sort()
print L
raw_input() #keeps the file open on windows

Order 3 Letters
Code:
te = raw_input('Input your value here:')
tex = raw_input('and again:')
text = raw_input ('once more:')
L = [te, tex, text]
L.sort()
print L
raw_input() #keeps it open in Windows
[Image: izsyo6.jpg]


Reply
#2
very good man! i was trying to learn Python but school and work does not let me Sad
Google es tu mejor amigo :]
Reply
#3
That's cool, never knew about the sort function.
Reply
#4
(11-04-2009, 08:32 PM)nevets04 Wrote: That's cool, never knew about the sort function.

Ya, there is also L.reverse to but it in the other order...
[Image: izsyo6.jpg]


Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Help Dεlluzion 3 1,749 09-30-2019, 12:59 AM
Last Post: samsmith001
  Simple Python Python Compiler Canoris 21 8,340 06-01-2011, 06:30 PM
Last Post: Filefinder
  Python 2 vs 3? Jake 8 2,218 12-11-2010, 04:13 PM
Last Post: Bursihido
  Python help Kharnage 2 743 02-12-2010, 09:07 PM
Last Post: Kharnage
  "==" and "is" in Python Canoris 1 737 02-07-2010, 03:55 PM
Last Post: uber1337

Forum Jump:


Users browsing this thread: 1 Guest(s)