Temperature Conversion v0.2

I just learned how to implement basic command-line argument with Python. Hence, I would like to incoporate this feature in the previous Temperature Conversion program. # convertc2f.py # Version: 0.2 # A program to convert Celsius temps to Fahrenheit # Date: 4/13/06 # by: S. San (Kenno)` import sys if (len(sys.argv) == 2): celsius = int(sys.argv[1]) else: celsius = int(input("What is the Celsius temperature? ")) fahrenheit = 9.0 / 5.0 * celsius + 32 print("The temparature is", fahrenheit, "degrees Fahrenheit.") Example with the command line argument: ...

April 13, 2006 · 1 min · 114 words · kenno

Using Java 5 on Mac OS X Tiger

Mac OS X Tiger still uses the J2SE 1.4 as default Java virtual machine and compiler. If you need to upgrade to JDK 5, you have to download it from Apple download site. After you install it, you need to change a symlink to point to the JDK 5: $ cd /System/Library/Frameworks/JavaVM.framework/Versions/<br /> $ sudo mv Current Current.old<br /> $ ln -s 1.5 Current<br /> $ mv CurrentJDK CurrentJDK.old<br /> $ ln -s 1.5 CurrentJDK ...

April 7, 2006 · 1 min · 110 words · kenno

Temperature Conversion

If you get used to read the temperature in Fahrenheit scale like me, you may be confusing to see the temperature in Celsius scale given in weather forcasting on Australian or New Zealand televisions. So today, I’m gonna share a small Python program which can be used to convert the temperature scale from Fahrenheit to Celsius. As my Python programming skill is very limited at the moment, the program is going to perform very basic function. ...

April 6, 2006 · 1 min · 166 words · kenno

Hello World &#8211; Python

I’ve been hearing a lot about “Python”, so I decided to pick up a book “Python Programming for Absolute Beginner” by Michael Dawson. Today, I’m going to share with you how to write classic “Hello World” program in Python. Fire your favorite text editor program, in my case I use vim. kenno$ vim helloworld.py Then type the following code: # Hello World<br /> print "Hello World!" Save it, and execute it with the following command: ...

April 5, 2006 · 1 min · 86 words · kenno

How to Decompress a bzip2 File

bunzip -v exampleFile.bz2 or bzip2 -dv exampleFile.bz2 bzip2 -h man bzip2 bzip2 homepage

April 4, 2006 · 1 min · 13 words · kenno