Skip to content

Instantly share code, notes, and snippets.

@paulodutra
Created July 25, 2023 13:22
Show Gist options
  • Save paulodutra/f0b34918cc6a1180a9a33f9fb932ec80 to your computer and use it in GitHub Desktop.
Save paulodutra/f0b34918cc6a1180a9a33f9fb932ec80 to your computer and use it in GitHub Desktop.
An example using count
sum = 0
count = 0
for c in range(1,7):
num = int(input('Digite o {} valor: '.format(c)))
if num % 2 == 0:
sum = sum + num
count = count + 1
print('Você informou {} números PARES e a soma foi {}'.format(count, sum))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment