-
-
Save parzibyte/3f243f2b9bce8246dba3c870fc07cd35 to your computer and use it in GitHub Desktop.
This file contains 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
""" | |
https://parzibyte.me/blog | |
""" | |
def es_multiplo(numero, multiplo): | |
return numero % multiplo == 0 | |
def imprimir_submultiplos(numero): | |
for i in range(1, numero+1): | |
if es_multiplo(numero, i): | |
print(f"{i},", end="") | |
if es_multiplo(9, 3): | |
print("Sí es múltiplo") | |
else: | |
print("No es múltiplo") | |
numero = 1024 | |
print(f"Ahora voy a imprimir todos los submúltiplos de {numero}") | |
imprimir_submultiplos(numero) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment