Skip to content

Instantly share code, notes, and snippets.

@alphanetEX
Created April 14, 2020 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alphanetEX/cfb6bee74ee461dee1315dda1b6f49a0 to your computer and use it in GitHub Desktop.
Save alphanetEX/cfb6bee74ee461dee1315dda1b6f49a0 to your computer and use it in GitHub Desktop.
Solicitar el ingreso de números mientras la suma de ellos no supere los 500. Al final mostrar la suma de los múltiplos de 3.
acumulator = 0
module_3 = 0
while acumulator <= 500:
number = float(input('insert any number: '))
if number % 3 == 0.0:
module_3 += number
else:
pass
acumulator += number;
print("the result of multiples of 3 is : ", module_3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment