Saturday 23 July 2016

"Hello Python!"

Today I am proud to say that I have learnt a few basics of python. By now, I have written quite a few simple codes and am still hoping to write more. I have published a few codes in a site called checkio.org, which is an awesome site to code by the way.
To use python, you must download python, however you can find a lot of online compilers as well.
So as a greeting to python, let's write a very simple code. To output 'Hello Python', we use the following:

 print ("Hello Python"!)
  

That produces the output:

 Hello Python!
  

The output that we require is kept in between the paranthesis. Please note that the paranthesis are very important. If we don't keep these we get a syntax error:

 SyntaxError: Missing parentheses in call to 'print'. 
  

More on variables in the next post.

No comments:

Post a Comment