Python Introductions(Tips)
Before we start here, I feel the need of give some friendly warnings!
When you can't do what you do
You do what you can
This ain't my prayer, it's just a thought
And never forget to have a nice day(I am aware, I'm such a big fun)! Our area of expertise demands a lot of practice, studies and among other things patience! So when you feel discouraged because you can't understand/do something, STOP, breathe , go relax through your favorite hobbies and come back with this Winston Churchill quote in mind:
Success consists of going from failure to failure without loss of enthusiasm.
OBS: The cover image theme is about JavaScript text, but was the only free one which I've found in https://www.freepik.com/home.
Where and how to start if I want to learn Python?
Well, contrary to what you may be thinking, there is no single way, it is more relevant to think about what is most effective in your case. There are people who prefer to read, others watch video classes, others even a combination of the two and so on. At the end of the article I will leave some suggestions of material for the most diverse learning palates, hence the power is yours(PLANET, Captain)! Now, considering that you already have chosen what material fits to you, there are some agreements which may be good to follow in your practice conduit.
Before Start the Code
It's helpful (not to mention indispensable) that in Python there are some built-in data types, conditional statements and that will be by your side until the end of time (or energy, whichever comes first).
Object-oriented programming is a programming paradigm that provides a means of structuring programs so that properties and behaviors are bundled into individual objects. Concept dictionary:
Recommended by LinkedIn
The Virtual Environment
The python virtual environment is what we create and initialize at the beginning of each project, as it will allow you to build the entire algorithm with all your libraries, modules and packages in a directory separate from the rest of your computer's memory. To create it, just type in your Interface Message Processor (IMP):
$ python3 -m venv .venv
Then, you have to activate it:
$ source .venv/bin/activate
Easy peasy, right? Always remember to check that it is enabled (a small ".venv" should appear on the left side of your command prompt) once your machine has rebooted, before starting writing again. Now your environment is ready for fun!
Installing Python Modules in the Virtual Environment
Assuming that your environment is already initialized and your code is running, you will eventually need some specific package, which will provide to you useful functions and behaviors for the purpose of your program. Following the idea of the beginning, in the command line type:
$ python3 -m pip install "some_package"
Once this is done, you can check all the packages installed by the command:
$ pip freeze
Running Python files
Once your application starts to take on a certain proportion, you will probably opt for some kind of construction architecture to make things more understandable (even because you won't be the only one who will read it). When that happens (and it will, believe me), python gives you mechanisms to work more fluidly. It may be the case that you want to run some file with your pc's pytohn interpreter, , which allows you to write code (in your preferred text interpreter, I recommend VSCode) and run it simultaneously, to do so, you may be helpful run your file in the prompt using:
$ python3 -i "file_name.py"
Auxiliary Bibliography and Other Teaching Materials
Most of the content I used to create this material has already been referenced through links to their respective URLs. Now I will put some other sources that may be interesting to consult:
As you can see there is no rule, there is only what works in each case, it's up to you to choose which path to take!
So, what now?
There is still a lot to be said and studied, little grasshopper, but I believe and have faith that from here there is already a direction in which you can start walking and remember that every great construction started with a simple brick (or stone block, depending on the era, but it was understandable). I hope that with this information I can, somehow, facilitate or even help in your career, it would make me really happy. If this really helped, leave a like, subscribe to the channel and... woops, wrong platform! See you around!
Congrats! Pedro de Almeida Alves 👏🏽