Задание 5 параграф 2.3
This commit is contained in:
parent
af17dd6f97
commit
53a540b398
18
2.3_lesson.5.20.py
Normal file
18
2.3_lesson.5.20.py
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
****Задание 5 Параграф 2.3***
|
||||||
|
**** Ваша задача — написать программу, которая помогает считать местности, где была замечена зайка.****
|
||||||
|
|
||||||
|
if name == "main":
|
||||||
|
# Решение с вложенными циклами
|
||||||
|
|
||||||
|
natures = int(input())
|
||||||
|
|
||||||
|
bunnies = 0
|
||||||
|
|
||||||
|
for _ in range(natures):
|
||||||
|
counted = False
|
||||||
|
while (s := input()) != 'ВСЁ':
|
||||||
|
if s == 'зайка' and counted is False:
|
||||||
|
bunnies = bunnies + 1
|
||||||
|
counted = True
|
||||||
|
|
||||||
|
print(bunnies)
|
||||||
Loading…
Reference in a new issue