Created
July 25, 2023 13:22
-
-
Save paulodutra/f0b34918cc6a1180a9a33f9fb932ec80 to your computer and use it in GitHub Desktop.
An example using count
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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