Module: (Python) Let's get acquainted!


Problem

3/4

Software Development Programs

Theory Click to read/hide

Programs

Program -  it is a set of instructions written in a language used by a computer. The brain of the computer - the processor, in turn, understands only one language - the language of machine codes (a sequence of zeros and ones). A person, however, is quite problematic to write a program in machine code language, not to mention finding errors and correcting them (debugging).
It was to facilitate the process of creating programs that high-level programming languages ​​were developed in which teams are close to the words of natural languages, most often English. But each word-command has a strictly defined meaning, and there is no exception.

Translator, compiler, interpreter

In order for the computer to understand, it can execute programs written in high-level languages, a special program is used - a translator
A translator can translate a program into machine codes of a specific processor - such translators are called compilers
The translator can itself execute the program, or it can translate it into a bytecode - each command has its own code, which takes one byte in memory (a number from 0 to 255). Such translators are already called interpreters.
Bytecode is executed by a virtual machine (for example, programs written in Java)

The python translator is an interpreter. Therefore, to run the program, you must install the Python interpreter on the computer.
The latest distribution can be downloaded from the page https://www.python.org/downloads/ 

For convenience, an integrated development environment (IDE) can be installed on the computer, which allows you to type, debug, and run programs.
There are many different development environments for the Python language, both commercial and free. 
Wing IDE 101 - A Simple Cross-Platform Free Learning Environment
Download Page: http://wingware.com/downloads/wingide-101 (choose your OS) or use the direct link  Wing IDE 101 (7.0.4) for Windows.
After installation Wing IDE be sure to install updates to the system ("Help" – "Check for updates").
After starting the Wing IDE, you can see a window divided into several parts

In the window marked with the number 1, you must write the program and be sure to save it (the file with the program has the extension .py
To start the program, use the button with a green triangle (Run)
You will see the result of work in the window indicated by the number 2

Problem

Complete the tasks in order:
1) Download and install the Python interpreter on your computer (https://www.python.org/downloads/
2) Download the Wing IDE 101 development environment for Windows or select the development environment for your OS on the official page
3) Launch Wing IDE
4) Copy the program below
5) Run the program in the IDE, see what it displays
6) Run the program in a browser
7) Compare work results