0
The program should receive two numbers, and then add all pairs between the received range, and multiply all the odd numbers of the received range (including those typed, always).
Must be used for
or while
How to present the result?
For example, imagining that the user entered the values 2 and 8, then the output would be:
2 + 4 + 6 + 8 -> 20
3 * 5 * 7 -> 105
My code goes below:
numero = 0
contador = 1
for numero in range(numero, 3, 2):
numero = int(input(f'Informe um número {contador}/2: '))
contador = contador + 1
while numero % 2 == 0:
for numero in range(numero, numero + numero):
print(numero)
while numero % 2 != 0:
for numero in range(numero, numero * numero):
print(numero)
Thank you. I gave it right, and I understood. :)
– EWSG
EWSG, good afternoon! Not at all, my dear. Hug!
– lmonferrari
@EWSG if that was the answer that helped you, consider marking as the correct one to help anyone who has the same question as you in the future. See "What should I do if someone answers my question?" and "How and why to accept an answer"
– fernandosavio
Oops. Thanks for the tip.
– EWSG