Small Python School #2

in Steem Schools2 years ago

Small shool, копия (2).png

We continue to study Python. In touch "Little school of learning Python", lesson 2.

The daily rate is 14-15 minutes.

Theses:

  1. Thinking carefully about variable names is critical. Otherwise it will be difficult to read your program.
  2. = assignment operation, not comparison. X -= 1 decrement, x +=1 increment. x -= 1 is x = x + 1, x //=2 - x divided by two, discarding the remainder, while it remains intact; x %= 2 - x becomes equal to the remainder of itself modulo 2. For both operations in practical programs, meaning.
  3. Cross out the zero, so as not to be confused with the letter, an old tradition of computer scientists.
  4. Indentation is supposed to be done with the help of four spaces.
  5. There is a coding style that should be followed. PEP 8
  6. In Python, it is forbidden to indent a true tab with 4 indent spaces.
  7. Function range - start stop stap. Perform a certain action a certain number of times.
  8. x = int(input()); input - handling user input.

The daily rate is 1/2-1/3 lessons.

Theses:

  1. The Python language is limited by brackets, symbols, it can understand not only English, but also, for example, Cyrillic. But it is better to use only English characters.
  2. There are very few keywords.
  3. To write and run Python programs, you need an interpreter. A translator program to translate our instructions into code that the computer can understand.
  4. There is an official programming environment from the official website https://www.python.org/downloads/ (Python 3.10.5 June 6, 2022)
  5. You need to create a new file if you want to create a program.
  6. Create a file - write a program - save - run.
  7. To start - in the RUN menu, or press F5
  8. You can consider other, more convenient, development environments.
  9. https://www.onlinegdb.com/ - online compiler, the ability to run a script in Python and other programming languages ​​without installation. Healthy!
  10. https://pythontutor.com/ - the ability to work with the code without installation, but at the same time it is possible to run the code step by step, which is very convenient when errors occur.
  11. https://jupyter.org/ Jupyter Notebook - handy for short programs. For small code it is convenient to use. Especially for calculations and calculations.

First lesson: https://steemit.com/hive-152587/@alexmove.witness/small-python-school-1

Small Python School Support Chat:
https://t.me/+lQtdzunysoxhOTgy

Thanks for studying.
Thank you for your attention.
Have a good day!

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.029
BTC 57956.22
ETH 3126.99
USDT 1.00
SBD 2.45