Using a while loop and an accumulator variable to sum an unknown number of inputs

Опубликовано: 25 Сентябрь 2023
на канале: PatchyPython
117
0

Jupyter Notebook on Google Colab: https://tinyurl.com/5awxwpn3
(Bioinfo track: https://tinyurl.com/yckxbptr )

We compute the sum total of an unknown number of values using an "accumulator" variable to keep a running total. A "while" loop is a natural choice in this case, as it allows us to go around for more input until the user says stop.

Embedded video, part of the following courses:
Computer Programming at Queen Mary, University of London
Coding for Scientists at Queen Mary, University of London

For the full context, see the notebooks linked above.


Смотрите видео Using a while loop and an accumulator variable to sum an unknown number of inputs онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь PatchyPython 25 Сентябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 117 раз и оно понравилось 0 людям.