Python is one of the fastest growing programming languages in existence today. The various uses of python range from basic calculation to back-end web application development (using Django) and even as complex as AI and mind reading algorithms.
In this series, we would be delving into application development with basic python and hopefully be able to complete some exciting python projects.
One upside of this tutorial is that you would be able to followup on whatever device you are reading this article with.
Projects To Complete By the End Of The Series
- Manipulating CSV Files with Python — Read, Write, & Append using the languages of snakes.
- Sending plain text and HTML emails through python and gmail.
- Send Formatted Emails to a Set of Users with python.
Without further delay, lets dive in to the main topic- Python!.
Isn’t it weird to learn how to code using a language named after a snake?
Python is a very powerful tool for application development and could be considered by many as an all purpose programming language. So considering all the uses and features it promises, we shouldn’t really be concerned as to what its named.
On the contrary, i agree its really weird to have such a name.
For example, as someone living in an African home, it is very difficult to use terms like python, anaconda, oh and even fork e.t.c without eyebrows or better still machetes being raised.
Why on earth was the name ‘python’ chosen? why not py++(pie-plus-plus) or py#(pie-sharp)
According to the official python documentation, the founder, Guido Van Rossum had a specific reason.
When he began implementing Python, Guido van Rossum was also reading the published scripts from “Monty Python’s Flying Circus”, a BBC comedy series from the 1970s. Van Rossum thought he needed a name that was short, unique, and slightly mysterious, so he decided to call the language Python.
I’ll try not to bore you with the history of python and how it was discovered, instead we’ll look straight into the foundations and prerequisites to begin using this powerful language.
Terms To Get Familiar With Before We Dive In To Hacking NASA with python
You know python is widely used for hacking among other uses right? Now you do!.
- Command Line
An IDE stands for an Integrated Development Environment. An IDE is where we would be writing our code that one day hopes to be powerful enough to hack the World Bank. it is a software that enables us to write code that is translated into a program by a compiler or interpreter.
It is very important to use the right IDE that suits you and the types of operations you’re looking to perform on it.
According to wikipedia,
A command–line interface or command language interpreter (CLI), also known as command–lineuser interface, console user interface and character user interface (CUI), is a means of interacting with a computer program where the user (or client) issues commands to the program in the form of successive lines of text.
In programming, mastering of the command line is a very important skill anyone should have as it gives us more control and flexibility over our computers.
Shell, also called as the interactive shell, is basically the command-line interface. In Mac you have the terminal, in Windows you have CMD. You can write Python Code mainly by two ways: Write your Python code in a .py file and then run it with your shell by typing ‘python filename.py’. or opening the python command prompt, either by just typing python in the windows/linux command prompt or by opening the installed python shell and then entering code line by line. You can also open the python shell by opening the python.exe application once python is installed on your computer.
I am not actually sure whats the exact deference between these two ways of running the python code does in the background, but the output of the code is the same.
Your First Python Script
To Get started with using python, you would need to have some applications installed on your device first.
You would need an IDE and python application installed.
There are many IDEs we could use but for this tutorial, we would be sticking with the Pycharm IDE as its a special IDE built specifically for running python and its related scripts.
Installing And Running Python On Your Computer
Visit https://www.python.org/downloads/ and download your preferred version of python. as at the time of writing this aricle, the current stable version of python available is python 3.7. The version of python you install might affect some of the applications you run. For example if you run a command saying
print(9/2) on python 3.7 your output is 4.5 whereas the same command would give you 4 on python 2.7 .
Download the preferred version of python suitable for your OS and begin the installation process on your computer. Once installed successfully, we can begin to run our python scripts and soon be able to hack NASA.
How To Write Python Code On Your Smartphone
Most people fail to realize that you can actually delve into software development armed with nothing but a smartphone — oh and of course, the passion to code.
Apps you can use to code python using your smartphone.
Below are the applications i recommend for coding and practicing python with your smartphone.
Code Python From Your Browser
If you prefer to skip any installation and setup processes, you could make use of a browser based python IDE. Personally i make use of repl.it. You could also make use of the official python shell from here.
Now that our environment is setup let’s proceed to run our first python script.
in your IDE or shell, type in
print('hello, world!') and hit the run button or press enter if you are using the shell.
You should get a result similar to the one below
That basically is day one folks!
The Link to the next chapter would be included in an update once day2 is published.
Remember to rain a lot of claps if you think i deserve it.
No, really i need the claps.