Python Rocks man!!

September 8, 2008 at 9:59 am (Uncategorized) (, , )

Its been around 30 minutes since i have been using python. I downloaded this pdf ebook written by Swaroop C H from Its hard to believe how easy it is to learn  Python. I have been sweating a lot over C++ lately, and this looks like a piece of cake.

One of the first programs i tried was converting a number to the base of 10 to a number of any base as input by the user. Here it is:

#converts number to the base ten to number to any base
def recurse(n,b):
  if n>=1:
    print m

i=int(raw_input("enter a number:"))
b=int(raw_input("enter base:"))

I love this program because it creates small code using recursion logic, and i came up with this solution in my first year of college when a friend asked me casually about it. It rocks even more in Python!



  1. Enrique Mogollan said,

    I use to have the same problem for the indentation, but I found: You could try it for getting a nice HTML for your code.

  2. Debayan said,

    Thanx a million 🙂

  3. Sayamindu said,

    I am currently writing a parser using Python, and I cannot believe how easy it is :-). Maybe you would want to do some of your OCR stuff in python ? 😉

  4. debayan said,

    Sounds like a nice idea.

  5. Shreyank Gupta said,

    Told ya! 😀

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: