Photo by Glenn Carstens-Peters on Unsplash
Explore the Wonderful World of Programming Languages with Python! | Part 2
Table of contents
Hey! Welcome to another chapter of learning Python. In the previous chapter, we talked about software engineers and why they are essential for tech advancement. We talked about learning to code, especially with Python, and how it enhances problem-solving skills and creativity. We talked about Python's readability, versatility, libraries, demand, and community support make it an ideal choice for beginners. So if you are interested in that chapter please check out below:
https://mrkoder.hashnode.dev/explore-the-wonderful-world-of-programming-languages-with-python-part-1
In this chapter, I am going to talk more about Python.
Installation
To use Python we need to install it in our system. See, there are online interpreters available for Python but if you truly want to learn it please install it in your system. So here are a few simple steps:-
Step 1: Go to python.org. :
Step 2: Click on the Downloads button.
Step 3: Click on download python. Download whatever the latest version is available.
Step 4: Install it just like you install any software in your system.
Note: If you are installing Python for the first time you will get an option "Add to path" check that box. It will add the Python interpreter to your whole system so that you can use it anywhere in your system.
Step 5: In your Windows search bar, search "cmd" and hit enter. It will open the command line window looking like this-
To check if you have successfully installed Python or not type-
python --version
it will return the version of the Python you have installed. If you are not getting the version reinstall it and make sure to check "Add to path" option.Now type
python
it will start the Python interpreter for you.Type
print("Hello World")
it will printHello World
Congratulations! You have successfully installed and run the first Python code.
Now, to write our programs using Python we need some code editors.
Code Editors
You will need a code editor to write your Python program because they are specialized software designed for writing and editing computer codes. There are so many different code editors available on the web. They offer so many features to make your development experience good. Here are some key characteristics of code editors:
Syntax Highlighting: Highlight different parts of the code with different colors which improves readability and helps you quickly identify different elements within your code.
Indentation and Formatting: Many editors automatically indent your code according to the programming language's syntax, making your code more organized and easier to understand.
Auto-completion: As you type, some editors suggest possible completions for code elements. This can save you time and reduce typos.
These are some of the features offered by different code editors but if you are new to programming I will suggest you to use Python's built-in code editor. Yes, Python has its own built-in code editor known as IDLE (Integrated Development Environment). It looks something like this:
And if you press ctrl+N
it will start a new window where you can write your whole Python program.
Here are some popular examples of code editors you can use if you are already familiar with programming:
Visual Studio Code (VS Code)
Sublime Text
Atom
Brackets
Notepad++
Conclusion
Python's readability, versatility, libraries, demand, and community support make it ideal for beginners. The installation process involves downloading the latest version from python.org, installing it, and adding it to the system path. Code editors are necessary for writing Python programs, with features like syntax highlighting, indentation, formatting, and auto-completion. Popular code editors include Visual Studio Code, Sublime Text, Atom, Brackets, and Notepad++.
If you liked it and learned something new please show your support by following me.