Архив рубрики: Публикации

Python – installation

To install Python on your computer, simply search Google for download python and follow the first link to www.python.org/downloads

The easiest way is to click on the bright button with the latest version of Python and then follow the installation process.

In addition to Python itself, you will probably need to install additional programs, which we will discuss next. When installing Python, remember that it is an interpretive programming language. If you write the code in notepad, it won’t work. And the code doesn’t need to be compiled like in C++. To run your code, you use either the built-in interpreter – Python 3.6.exe, or you can activate the interpreter in other text editors or programming environments.

1. Изменение системных переменных среды

Эта настройка позволит запускать программу, написанную на Python, в CMD операционной системы Windows (интерпретатор командной строки). Чтобы это сделать, нажимаем “Пуск” -> Изменение системных переменных среды: Читать

Python: lifehacks for setting up a programming environment

Once you’ve installed Python on your computer, it’s best to take care of the little nuances that make life easier for programmers. Let’s go through the basic settings of the programming environment and Windows for comfortable work:

1. Changing System Environment Variables

This setting will allow you to run a program written in Python in the CMD of the Windows operating system (command line interpreter). To do this, click “Start” -> Change system environment variables:

Читать

Python: Challenges and Solutions (Chapter 1. Getting Started. The Game Over Program).

We continue to learn programming. After the second chapter in the book: Michael Dawson “We Program in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where I studied the features of working with text in the Python programming language, tasks were offered. Let’s do them together. I will give my solution, and you write your options in the comments.

1) Learn how to trigger a bug: Interactively enter the name of your favorite ice cream brand. Then fix the error and create a command that will correctly display the name on the screen this type of ice cream.

Читать

Python: data types and the input() function

There are several data types in the Python programming language, for example:

  • integers int(x), for example, 1-2-3-4;
  • fractional numbers float(x), for example, 1.0-2.0-3.5;
  • str(x) strings, which can contain text and other characters.

The input() function has already been discussed earlier, this function allows the user to enter data into the program, this data can be further used.

Читать