Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tut] 6 Easy Steps to Get Started with Python

#1
6 Easy Steps to Get Started with Python

When Guido van Rossum released the first viable Python version 0.9.0 in 1991, he couldn’t have expected (by a long shot) that he was on the verge of creating the most influential programming language in the world. Python has a bright future: every new Python version adds new features to the programming language.


In this quickstart guide, you’ll learn how to set up Python on your computer and install the newest version. Because Python is constantly evolving, we keep this information as generalized as possible.

So, how to get started with Python? Let’s go over the steps one by one.

Step 1: Download Python


First, please visit the official Python website and download the latest Python version. The download manager should already propose the correct installer for your operating system because it receives this information through your browser accessing the site.

Python Download Websitehttps://blog.finxter.com/wp-content/uplo...00x111.png 300w, https://blog.finxter.com/wp-content/uplo...150x56.png 150w" sizes="(max-width: 605px) 100vw, 605px" />

Step 2: Install Python on Your Machine


Second, run the installer on your computer. In most operating systems, there’s nothing more to it than double clicking the downloaded file.

https://blog.finxter.com/wp-content/uplo...00x195.png 300w, https://blog.finxter.com/wp-content/uplo...150x98.png 150w" sizes="(max-width: 605px) 100vw, 605px" />

Step 3: Check Your Python Installation


Third, check if your Python installation worked properly by running the following command in your command line or PowerShell (Windows), terminal (MacOS), or shell (Linux).

$ python –version
Python 3.8.3

Related: You can find all about checking your Python version on my detailed blog article.

Here’s a screenshot checking the Python version on my Windows machine:

https://blog.finxter.com/wp-content/uplo...300x42.png 300w, https://blog.finxter.com/wp-content/uplo...150x21.png 150w" sizes="(max-width: 605px) 100vw, 605px" />

Congratulations, you have installed Python on your computer!

Step 4: Write Your First Hello World Program with IDLE


You can start writing your own programs with the IDLE editor that’s built into your system. Just search the phrase ‘IDLE’ on your operating system and open the program:

https://blog.finxter.com/wp-content/uplo...00x164.png 300w, https://blog.finxter.com/wp-content/uplo...150x82.png 150w" sizes="(max-width: 605px) 100vw, 605px" />

To start your first own program, type the following command into your shell:

>>> print('hello world!')

Python will interpret your command and print the desired words to your shell:

hello world!

This mode of communicating back-and-forth with your Python interpreter is called “interactive mode”. It has the advantage of immediate feedback. However, the great things about programs is automation—writing a program once and running it again and again.

For example, how to write a program that greets you by name every time you run it?

Step 5: Create Your First Python Module


To allow you to write a program once, save it on your computer, and run it at any later point in time, Python comes with what you may call a “scripting mode”. In this mode, you write a Python script and store it in a file with the suffix .py such as my_first_program.py.

You can create such a file via the menu of your IDLE shell:

https://blog.finxter.com/wp-content/uplo...00x168.png 300w, https://blog.finxter.com/wp-content/uplo...150x84.png 150w" sizes="(max-width: 605px) 100vw, 605px" />

Click “New File” and copy&paste the following code into your new file:

name = input("What's your name? ")
print('hello ' + name)

You’ll learn about the commands of the Python programming language in my free email academy (with cheat sheets). For now, please store your file under the name 'hello.py' on your Desktop or any other location. Your current state should look like this:

https://blog.finxter.com/wp-content/uplo...300x69.png 300w, https://blog.finxter.com/wp-content/uplo...150x35.png 150w" sizes="(max-width: 605px) 100vw, 605px" />

You can test-run this program here in your browser in our interactive Python shell:

Exercise: Run the code and type in your name. What’s the output?

Step 6: Run Your First Module


Now, let’s get some action going: Click Run > Run Module. The Python program start executing in the interactive shell—but without you needing to type each line into it. It runs through the code file line by line. The first line asks you to put in your name. Type it in. The second line then takes your name and prints it to the shell. Here’s how this looks in my case:

https://blog.finxter.com/wp-content/uplo...300x42.png 300w, https://blog.finxter.com/wp-content/uplo...150x21.png 150w" sizes="(max-width: 605px) 100vw, 605px" />

Conclusion


Believe it or not, this procedure will later allow you to run your own applications. Although the applications will get more complicated, the basic process looks the same: First, you create a Python file that contains the application. Second, you run the application on your computer. Theoretically, you don’t need any other Python editor – the preinstalled IDLE editor is all you need!

While this is already a great accomplishment for the day, most coders don’t use the built-in Python editor IDLE a lot. Why? Because it’s harder with the IDLE editor to write simple programs and the editor doesn’t provide you with advanced tools, assistance, and language support. Instead, a far better option for most coders will be to install an integrated development environment (IDE). One of the most popular for Python is PyCharm.

However, this is an optional step and different coders prefer different development environments. You can find detailed installation and setup guides online. We recommend you follow these instructions to set up your own PyCharm projects. Even if this takes you an hour or so to complete, it’s a good investment in your future productivity!

Where to Go From Here?


Enough theory, let’s get some practice!

To become successful in coding, you need to get out there and solve real problems for real people. That’s how you can become a six-figure earner easily. And that’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?

Practice projects is how you sharpen your saw in coding!

Do you want to become a code master by focusing on practical code projects that actually earn you money and solve problems for people?

Then become a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.

Join my free webinar “How to Build Your High-Income Skill Python” and watch how I grew my coding business online and how you can, too—from the comfort of your own home.

Join the free webinar now!



https://www.sickgaming.net/blog/2020/09/...th-python/
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tut] Overriding in Python xSicKxBot 0 7 10-29-2020, 04:49 AM
Last Post: xSicKxBot
  [Tut] How to Install PIL/Pillow in Python? A Helpful Illustrated Guide xSicKxBot 0 7 10-27-2020, 12:00 AM
Last Post: xSicKxBot
  [Tut] How To Kill A Thread In Python? xSicKxBot 0 10 10-24-2020, 05:40 AM
Last Post: xSicKxBot
  [Tut] Python’s NameError: name ‘xxx’ is not defined — How to Fix This Stupid Bug? xSicKxBot 0 19 10-16-2020, 10:30 PM
Last Post: xSicKxBot
  [Tut] Python IndentationError: unexpected indent (How to Fix This Stupid Bug) xSicKxBot 0 22 10-10-2020, 08:24 PM
Last Post: xSicKxBot
  [Tut] Yield Keyword in Python – A Simple Illustrated Guide xSicKxBot 0 25 10-09-2020, 06:13 PM
Last Post: xSicKxBot
  [Tut] Python Reverse List with Slicing — An Illustrated Guide xSicKxBot 0 42 10-02-2020, 04:24 AM
Last Post: xSicKxBot
  [Tut] How to Remove Duplicates From a Python List While Preserving Order? xSicKxBot 0 41 10-01-2020, 02:21 AM
Last Post: xSicKxBot
  [Tut] How To Update A Key In A Dictionary In Python If The Key Doesn’t Exist? xSicKxBot 0 45 09-29-2020, 09:02 PM
Last Post: xSicKxBot
  [Tut] How to Get the Last Element of a Python List? xSicKxBot 0 43 09-28-2020, 02:36 AM
Last Post: xSicKxBot

Forum Jump:

Become a Patron!
[-]
Upcoming Events

[-]
Latest Threads
[Tut] How Many Freelance Developers Are ...
Last Post: xSicKxBot
Today 08:27 PM
» Replies: 0
» Views: 1
(Indie Deal) HALLOWEEN SCRATCHY SALE, Be...
Last Post: xSicKxBot
Today 08:26 PM
» Replies: 0
» Views: 2
Xbox Wire - Celebrate Halloween in Dead ...
Last Post: xSicKxBot
Today 06:19 PM
» Replies: 0
» Views: 1
News - Don’t Miss: Looking back at Left ...
Last Post: xSicKxBot
Today 06:19 PM
» Replies: 0
» Views: 2
News - Report: Latest Cyberpunk 2077 del...
Last Post: xSicKxBot
Today 06:19 PM
» Replies: 0
» Views: 2
Microsoft - Putting differential privacy...
Last Post: xSicKxBot
Today 02:34 PM
» Replies: 0
» Views: 3
News - Review: Green Hell – A Brutal And...
Last Post: xSicKxBot
Today 02:34 PM
» Replies: 0
» Views: 3
News - Sony Details PS5 Accessibility Se...
Last Post: xSicKxBot
Today 02:34 PM
» Replies: 0
» Views: 3
[1.06] BO4 Zombie Trainer (Call of duty ...
Last Post: g1ntok1
Today 09:49 AM
» Replies: 14
» Views: 524
(PC) Battlefield 4 [Open Source cheats] ...
Last Post: Adam_Burgess
Today 08:12 AM
» Replies: 25
» Views: 15476

[-]
Twitter

[-]
Sponsored
Get the Deal of the Week at RefurBees.com

Copyright © SickGaming.net 2012-2020