Today in class I started to get into the spheres of the programming language called “Phython”. Compared to other programming language such as Java or C++, Python is known to be more of a general-purpose tool and thus perfect for total beginners like I am.
By the way: for any of you interested in widening their musical spectrum and those of you who would like to see more of my hometown, make sure to check out the following HipHop song by one of my favorite Germany rap groups (Their name really translates exactly to: Absolute Beginners – Exactly the way I feel right now)
Now, let’s get into Python and the first things I learned while using the IDLE software!
I decided to start off with the first major topic on the list which is the ‘Use of comments’. . I started out with programming a single line comment for this blogpost.
The way how to use a single line comment works the following:
You open the IDLE software and type print(“Hello World“). Here you can see my first output:
I also tried to figure out how a multiple line comment works but in the end I wasn’t able to do this within my Python 3.5.2. IDLE window. I will ask our tutor Ken next time if he could help me with this.
I hope you liked my first little tutorial and feel free to shoot me some messages via Twitter (@tecjames) or comment on this post if you have any questions!
Sources used for this post:
http://www.afterhoursprogramming.com/tutorial/Python/Comments/
https://www.codecademy.com/en/forum_questions/505ba3cfc6addb000200e33c
Move to a full editor of Python files to do multi-line. I recommend using Atom as your editor and then open a terminal window (Mac/Linux) or use the Cygwin terminal (Windows) to change to the directory of your program and “run” it.
LikeLike
Thanks for the quick reply!
I will try to do it now. 🙂
LikeLike
I figured out how to open a file of a single line comment through the terminal but I can’t seem to find the information on how to structure the file for a multi line comment.
Is it done by typing “”” on the beginning and end of the printed text or am I getting this wrong?
Used this source: http://www.afterhoursprogramming.com/tutorial/Python/Comments/
LikeLike