repl.it
@sidonduarte/

loop-while

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
##
# Resposta STOpt
# https://pt.stackoverflow.com/q/349204/7412
# Sidon 2018
##

def count_f(registros):
  faltas, i = 0, 0
  while i < len(registros):
    if registros[i] == 'f':
        faltas += 1

    i += 1
  return faltas

while True:
  registros = input()
  if registros == '-':
            break

  print(count_f(registros))