| 1 |
#!/usr/bin/python |
| 2 |
|
| 3 |
import sys |
| 4 |
|
| 5 |
aglobal9 = 9 |
| 6 |
|
| 7 |
def celsius_to_farenheit(celsius): |
| 8 |
atuple = "a", "b", "c" |
| 9 |
alist = [1, 2, 3] |
| 10 |
aset = set([1, 2, 3]) |
| 11 |
adict = { 1 : "a", 2 : "b", 3 : "c" } |
| 12 |
|
| 13 |
nine = aglobal9 |
| 14 |
five = 5 |
| 15 |
thirty_two = 32 |
| 16 |
i = 1 |
| 17 |
return str((nine * celsius) / five + thirty_two) |
| 18 |
|
| 19 |
def main(): |
| 20 |
if (len(sys.argv) < 2): |
| 21 |
print ("Usage: " + sys.argv[0] + " Temp") |
| 22 |
return 1 |
| 23 |
|
| 24 |
celsius = int(sys.argv[1]) |
| 25 |
print (str(celsius) + " Celsius is " + celsius_to_farenheit(celsius) + " Farenheit") |
| 26 |
return 0 |
| 27 |
|
| 28 |
if __name__ == "__main__": |
| 29 |
sys.exit(main()) |