Hy everyone, I hope you all are having a happy day. I would be sharing my experience as regards python programming for those who may be interested in learning the course for free. We can do that as a team here.
Firstly I will like to define what python is all about
Python is a high level programming language that is broad. It can be used for studying data science, build and develop website, application software’s and lots more.
Introduction to python course
This section briefly introduces some python codes, if you are new to python, then this is the best start for you. To get started with python, download the software online by clicking the link below.
https://www.python.org
Then proceed to the next step below.
Printing
Printing a message in python simply means output of a code.
The print a message, use print command and parenthesis. The rule is that for alphabets, use quotation mark as seen in the image below.
The image below shows a python code to print the text “hello brother, I am python”
The code looks like this print (“hello brother, I am python”)
Can you see everything in the parenthesis is what is been shown as output? Do same thing , change the variables and view result.
Arithmetic aspect of python
Python can carry out, arithmetic operations such as;
Addition
Subtraction
Division
multiplication
Let’s Write a Simple Multiplication code in Python
Type in the code in you python command line interface and the output is displayed as seen.
Let’s Write a Simple Addition code in Python
Type in the code in you python command line interface and the output is displayed as seen.
Let’s Write a Simple Division and multiplication code in Python
Type in the code in you python command line interface and the output is displayed
as seen.
Adding comments to python code
Comments is used to add detailed description of a python code should incase one might want to work on it in the later future, probably another python expert such individual will be able to understand your line of code.
To add comments to your line of code in python, use # symbol.
Take a look at the code sample above and type yours in the command line interface.
You get to see the statement is not displayed in the output but only shows a comment.
At this point, we have pulled through an introductory phase in python. We shall get to explore more in the next guide.
Thanks for readin?
Thanks! I like python, is simple and cool