
#bootcamp
#python
Introduction
This tutorial will help you learn the basics of programming and Python. We are using Python since it is a language with most simple syntax, but it does not mean that programming with Python can not get complex. The knowledge you will learn here is transferable to other languages, as you will code and learn more you will come to realize that difference is really in language syntax.
The content will be organized into short posts with practical examples where we will go thru concepts by using Python as we get to them, examples will be simple and the focus will be more on the sole use of Python language than building complex projects so readers could use most of their energy on learning the Python and programming concepts. Do not be afraid, we never will write a tedious page with lots of abstract terms and commands to remember, you will learn Python by using it.
Getting Started
To install Python and its default editor IDLE go to the official Python site, Python.org, I recommend using the latest version, in our case, it is Python v3.10.9. If you are on Linux install Python and IDLE by using your package manager. After we are done with dependencies, find IDLE on your system and run it.
Familiar with IDLE - Hello world
Python is an object-oriented language but it can work in iterative mode. IDLE by default opens as an iterative console and it will execute anything we enter into it, like printing text or printing mathematical calculations. Write 'Hello, World!' and press enter. Try some examples of your own.
Python Files
The IDLE console is great but we really want to save our code for future use so we need files, and Python has its own kind of files, they are using the '.py" extension. We can create a file in IDLE by going to the File menu and selecting the New File option or by pressing CTRL+N. Now you are prompted with an empty file, so it is best to write some code in it, save it and test run it with the F5 key or by pressing the Run menu at the top and selecting Run Module, and the resulting output will be visible in your IDLE console.
I recommend playing with it a little bit, looking at the results, making some conclusions from it of what just happened, and remembering how to print strings as it is useful to know. Later on, we will use some more advanced manipulation for outputting data. Go to the Next Chapter.
[root@techtoapes]$ Author Luka
Login to comment.