Telegram Group & Telegram Channel
Что не так с приведённым кодом?

В Python переменные не объявляются заранее, поэтому интерпретатор самостоятельно определяет их область видимости. Если внутри функции используется переменная, она считается локальной. В данном случае переменная count является глобальной, что приводит к возникновению ошибки в коде.


Библиотека собеса по Python



tg-me.com/py_interview_lib/891
Create:
Last Update:

Что не так с приведённым кодом?

В Python переменные не объявляются заранее, поэтому интерпретатор самостоятельно определяет их область видимости. Если внутри функции используется переменная, она считается локальной. В данном случае переменная count является глобальной, что приводит к возникновению ошибки в коде.


Библиотека собеса по Python

BY Библиотека собеса по Python | вопросы с собеседований




Share with your friend now:
tg-me.com/py_interview_lib/891

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Start with a fresh view of investing strategy. The combination of risks and fads this quarter looks to be topping. That means the future is ready to move in.Likely, there will not be a wholesale shift. Company actions will aim to benefit from economic growth, inflationary pressures and a return of market-determined interest rates. In turn, all of that should drive the stock market and investment returns higher.

Telegram announces Search Filters

With the help of the Search Filters option, users can now filter search results by type. They can do that by using the new tabs: Media, Links, Files and others. Searches can be done based on the particular time period like by typing in the date or even “Yesterday”. If users type in the name of a person, group, channel or bot, an extra filter will be applied to the searches.

telegram from br


Telegram Библиотека собеса по Python | вопросы с собеседований
FROM USA