So programming is the art of ordering a computer to do exactly what you want, and Python is one of the languages that it is able to understand to receive your orders. We are going to try this away with very simple orders concerning numbers, since it is the numbers that constitute his material of choice. We will provide him with our first «instructions», and in passing clarify the definition of some essential terms of the computer vocabulary, which you will encounter constantly in the rest of this book.
Preliminary note: As we explained in the preface (see: Language versions, page 10), we decided to use in this course the new version 3 of Python, which introduced some syntax changes compared to previous versions. Whenever possible, we will indicate these differences in the text, so that you can easily analyze or use older programs written for Python 1 or 2.
Calculate with Python:
Python presents the particularity of being able to be used in several different ways.
You will first use it in interactive mode, that is to say in such a way that you can dialogue with it directly from the keyboard. This will allow you to discover a large number of language features very quickly. In a second step, you will learn how to create your first programs (scripts) and save them on disk.
The interpreter can be launched directly from the command line (in a Linux «shell» or in a DOS window under Windows): just type the python3 command (assuming that the software itself has been correctly installed, and that it is one of the latest versions of Python), or python (if the version of Python installed on your computer is earlier than version 3.0).
If you use a graphical interface such as Windows, Gnome, WindowMaker or KDE, you will probably prefer to work in a «terminal window», or in a specialized work environment such as IDLE.
Python is an extremely versatile programming language. You can use it to create websites, machine learning algorithms and even autonomous drones. Programming language is Python, the most used by programmers around the world. This gives you the power to create almost anything. But you have to learn it first. Learning any programming language can be daunting.
So how do you learn Python?
It was one of the things that increased my frustration even more when I was learning Python, where the general nature of all the learning sources currently in the world is the first. I wanted to learn how to create websites in Python, but it seemed like all the learning resources wanted me to spend two long, boring months on Python syntax.
Most tutorials assume that you need to learn all the Python syntax before you can start doing something interesting. That’s what leads to months of syntax, when what you really want to do is analyze data, create a website, or create a stand-alone drone. This is what makes your motivation fade and you just cancel everything.
After several attempts, I found a process that worked better for me. What led to success and excellence was the combination of learning foundations and how to build things of interest. So it wasn't until I learned the basics of language, and then I indulged and went deep on the bird to create the objects that mattered to me and program them on the speed wing.In this article, I’ll explain how to learn Python step by step, no matter why you want to learn Python.
1. Determine what motivates you:
Before you start learning Python, you should ask yourself why you want to learn it. This is because the journey will be long and sometimes painful. Without enough motivation, you will probably not succeed. For example, I slept during programming classes in engineering school when I had to memorize syntax and was not motivated. On the other hand, when I needed to use Python to create a website, I stayed up all night to finish it.
Determining what motivates you will help you determine a final goal and a path that will take you there without trouble. You don’t have to find a specific project, but just a general area that interests you.
Try to choose a particular place to get you interested, for example:
Data Science / Machine Learning
Mobile app
Websites
Games
Hardware/ Sensors/ Robots
Scripts to automate your work
Python allows you to create websites using Framwork Flask or Django. So how to learn Python for these uses?
Yes, you can create websites using Python!
Identify one or two areas you are interested in and are willing to spend time on. In the end you will go towards your goal and towards them by learning you, while you do not hesitate to build your projects and localize your ideas independently.