The first sign that you'd continue pursuing a language is when you get the first words right. In coding parlance, those words are Hello World! I dreaded at the very mention of code – so much of syntax, commands and rules to understand. Moving beyond C and C , I'd heard a lot about Python, thanks to Google's interest. It's widely believed to be a very powerful language. Surprisingly, however, for someone who's not been in touch with code for years, it comes across as something that's easy to grasp. That's the beauty of a high-level language. It reads just like English.
Thankfully, there's the Hello World program that gets you familiar with the concepts in a particular language. I had the audacity to try out Python yesterday, and for a wonder it all just worked out smoothly! Being a high-level interpreted language, you don't need to compile, rather you need an interpreter. It's actually simple. All you need to do is download Python from its web site.
With Windows, all you need to do is double-click on the installation file. You'd be done in under a minute, quite literally. The next step, is to point the path in Windows, so that python is accepted as a command. I tried version 2.7. After installation, you'll find a folder called Python27 in your C: drive.
In order to map the path in Windows to Python, go to the command prompt (press [Windows] [R], and type cmd). Type set path=%path%;C:python27 and you're set to use the command python to invoke the Python interpreter.
Now to start your experience with Python, go to your text editor. Notepad or Programmer's Notepad (recommended by Python) is good. Open a new file, and type out the following:
print "Hello World!"
Without going any further, save this file, and name it as hello.py. Open the command prompt again and navigate to the location where you saved your first Python script.
Now type python hello.py. If all goes well, you'd see Hello World!
Now just to compare the convenience of Python, look at the line of code needed for the same task in C. Excluding comments, you'll have to type the following:
Looking back at your code, doesn't Python truly read like English? It'd be wrong to think this language is named after a reptile. Officially Python claims the name has nothing to do with reptiles. Instead, it's named after a BBC TV show titled, Monty Python Flying Circus.
There's more to Python than Hello World! but as the saying goes, learn to walk before you run, we got to build on the concepts behind a language, before we think of building with it. Hopefully, Python will turn out easier than other languages such as C .
Reliance Jio introduces new recharge plan with Disney+ Hotstar VIP annual subscription ahead of IPL 2020
Digit caters to the largest community of tech buyers, users and enthusiasts in India. The all new Digit in continues the legacy of Thinkdigit.com as one of the largest portals in India committed to technology users and buyers. Digit is also one of the most trusted names when it comes to technology reviews and buying advice and is home to the Digit Test Lab, India's most proficient center for testing and reviewing technology products.
We are about leadership-the 9.9 kind! Building a leading media company out of India.And,grooming new leaders for this promising industry.