User:Lookup database/Scripts/Python/Python tutorial

From Wikipedia, the free encyclopedia

User Page | User Talk | Lookup Database | Contribs | Subpages

Category:Lookup database


Welcome to Python! In this page, I will provide a quick python download, installation, and reference tutorial.

Download and Installation[edit]

To download Python, go to https://python.org/downloads and select the download button corresponding to your system. Then, follow the steps on the page. Then, run the setup wizard. Click next on all pages, but make sure to enable "Add to PATH" when installing. Once it has installed, go to https://docs.python.org/ to view the basics. I also recommend the Udemy course Python: From Zero to Hero as a starter guide. More info on Python (programming language).

Writing your first code[edit]

The Python IDLE Icon
Python IDLE Icon

When you have downloaded and installed Python, type "IDLE" in the Windows or Mac search bar. You should see a result "IDLE (Python 64-bit)." Add it to your taskbar. To start python, click on the icon (right) on the taskbar to open the IDLE (Integrated Development and Learning Environment).

To run your first python code, open the IDLE. You should see something like

Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> |

in the IDLE. To run code, type your command in and press the "Enter" or "Return" key on your keyboard. Type

>>> print("Hello World!")

into the IDLE and run it. You should get the output "Hello World!" back from the IDLE. Congrats! You have written your first line of code in Python!