Найти - Пользователи
Полная версия: программа не выводит на экран из цикла
Начало » Центр помощи » программа не выводит на экран из цикла
1
DmitriyShchuklin
i = 10
last_number = 1
def print_numbers(last_number):
while i > 1:
print(i)
i = i - 1

print('finished!')
py.user.next
  
>>> def print_numbers(last_number):
...     i = 10
...     while i >= last_number:
...         print(i)
...         i = i - 1
... 
>>> print_numbers(1)
10
9
8
7
6
5
4
3
2
1
>>> print('finished!')
finished!
>>>
DmitriyShchuklin
Спасибо
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB