Hello,
I am doing the following program:
The program should print all numbers divisible by 7, but not multiples of 5, between 3000 and 3200 (inclusive).
It turns out that I already did the code, but this one is not working in the best way and I can not solve it.
print("="*25)
print("Números divisíveis por 7")
print("="*25)
# modifique as 2 proximas variaveis para testar o programa
numeroDe = 3000;
numeroAte = 3200;
pares = 0;
impares = 0;
divPorSete = 0;
while (numeroDe <= numeroAte):
if numeroDe % 2 == 0:
pares += 1;
else:
impares += 1;
if numeroDe % 7 == 0:
divPorSete += 1;
numeroDe += 1;
print ("Resumo de divisiveis entre ", numeroDe, " e ", numeroAte)
print ("\t- Números pares: ", pares)
print ("\t- Números impares: ", impares)
print ("\t- Números divisiveis por 7: ", divPorSete)
I ask for your help.