User:Lookup database/Scripts/Python/Python tutorial: Difference between revisions
No edit summary |
No edit summary |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{User:Lookup_database/Template_List/Template:Header}} |
|||
Welcome to Python! In this page, I will provide a quick python download, installation, and reference tutorial. |
Welcome to Python! In this page, I will provide a quick python download, installation, and reference tutorial. |
||
=== Download and Installation === |
=== Download and Installation === |
||
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 |
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 [https://udemy.com/course/complete-python-bootcamp/ Python: From Zero to Hero] as a starter guide. More info on [[Python (programming language)]]. |
||
=== Writing your first code === |
=== Writing your first code === |
||
[[File:Text-x-python.svg|alt=The Python IDLE Icon|thumb|110x110px|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<syntaxhighlight lang="python3"> |
|||
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. |
|||
>>> | |
|||
</syntaxhighlight>in the IDLE. To run code, type your command in and press the "Enter" or "Return" key on your keyboard. |
|||
Type<syntaxhighlight lang="python3"> |
|||
| ⚫ | |||
| ⚫ | |||
Latest revision as of 23:45, 29 November 2020
Welcome to Python! In this page, I will provide a quick python download, installation, and reference tutorial.
Download and Installation
[edit | edit source]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 | edit source]
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!