Jump to content

User:Lookup database/Scripts/Python/Python tutorial: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
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 "Python: From Zero to Hero" as a starter guide. More info on [[Python (programming language)]].
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]]
To start Python, type "IDLE" in the Windows or Mac search bar. Then, add it to taskbar. Click on the icon to open the IDLE (Integrated Development and Learning Environment). Then, try typing:<syntaxhighlight lang="python3">
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).
⚫
print("Hello World!")

⚫
</syntaxhighlight>You should get the output "Hello World!" back from the IDLE. Congrats! You have written your first line of code in Python!
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">
⚫
>>> print("Hello World!")
⚫
</syntaxhighlight>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!

Latest revision as of 23:45, 29 November 2020


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 | 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]
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!