Ответ:
Объяснение:
a = input()
print(a.count('Z'))
print(a.count('P'))
Без метода count
z = 0
p = 0
for i in range(0, len(a), 1):
if a[i] == 'Z':
z += 1
if a[i] == 'P':
p += 1
print(z)
print(p)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
Объяснение:
a = input()
print(a.count('Z'))
print(a.count('P'))
Без метода count
a = input()
z = 0
p = 0
for i in range(0, len(a), 1):
if a[i] == 'Z':
z += 1
if a[i] == 'P':
p += 1
print(z)
print(p)