Kata5 Ejercicio 1 - Usando funcion round para practicar. #122
Eholguin05
started this conversation in
Show and tell
Replies: 6 comments 6 replies
|
Hice lo mismo, también creo que utilice absoluto, porque me salían negativos, debido a que hice la reta alrevez, el primer planeta con el segundo |
0 replies
|
Exacto, para quitar decimales puedes:
|
0 replies
|
De donde sale el .621? |
0 replies
|
Es el equivalente, en millas, a 1 Km.
…________________________________
De: JorgeCanto3 ***@***.***>
Enviado: martes, 15 de febrero de 2022 10:16 p. m.
Para: LaunchX-InnovaccionVirtual/CursoIntroPython
Cc: EnriqueIbarraM; Comment
Asunto: Re: [LaunchX-InnovaccionVirtual/CursoIntroPython] Kata5 Ejercicio 1 - Usando funcion round para practicar. (Discussion #122)
De donde sale el .621?
—
Reply to this email directly, view it on GitHub<#122 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AXVPUMFK7VYZZWCGSJO6E23U3MQJ3ANCNFSM5ODHBPCQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID: ***@***.***>
|
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
En el ejercicio 1 de la Kata 5, el segundo valor me salió con decimales, así que investigue un poco y utilice la función 'round' para redondear. Espero les sea de su interés y ayuda.
first_planet = 149597870
second_planet = 778547200
distance_km = second_planet - first_planet
print(distance_km)
distance_mi = distance_km * 0.621
round (distance_mi)
All reactions