Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991, Python's design philosophy emphasizes code readability with its notable use of indentation 1
Getting the installer
Visit https://www.python.org/downloads/ and look for the bright yellow download button. As of now, the button links to the installer for version 3.8.5, having the text Download Python 3.8.5
.
While installing, remember to check Add Python 3.8 to PATH
. Doing so will simplify running python scripts from the command line later on.
Python Installation provides two main methods of interaction
- IDLE - A simple text editor that can run the given script
- Interpreter(shown as Python 3.8 in the menu) - a REPL(Read-Evaluate-Print-Loop) shell that can run commands as you type
To write a new script, open the IDLE, Click File > New File
to create a new python file.
As a test program, you can enter the following piece of code into the editor.
parents, babies = (1, 1)
while babies < 100:
print('This generation has {0} babies.'.format(babies))
parents, babies = (babies, parents + babies)
That's all folks. As easy as that.