Skip to content

Commit

Permalink
Create fernandoomarinn.py
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandooMarinn authored Jul 31, 2023
1 parent 61b225b commit 8bb45a3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Retos/Reto #31 - EL ÁBACO [Fácil]/python/fernandoomarinn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
abaco = ["O---OOOOOOOO",
"OOO---OOOOOO",
"---OOOOOOOOO",
"OO---OOOOOOO",
"OOOOOOO---OO",
"OOOOOOOOO---",
"---OOOOOOOOO"]


def convertir(abaco):
multiplicador = 1_000_000
num = 0

for linea in abaco:
separados = linea.split("---")

unidades = len(separados[0])

num += unidades * multiplicador

multiplicador /= 10

return num

0 comments on commit 8bb45a3

Please sign in to comment.