Kata5 Ejercicio 1 - Usando funcion round para practicar. #122
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 |
Beta Was this translation helpful? Give feedback.
-
Exacto, para quitar decimales puedes:
|
Beta Was this translation helpful? Give feedback.
-
Hola, yo tengo este problema, me sale este error y ya le intente de muchas formas y ninguna me funciona. |
Beta Was this translation helpful? Give feedback.
-
De donde sale el .621? |
Beta Was this translation helpful? Give feedback.
-
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: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Muchas gracias, no se que paso pero lo copie en un nuevo notebook y el código corrió sin problemas, muchas gracias por la ayuda. |
Beta Was this translation helpful? Give feedback.
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)
Beta Was this translation helpful? Give feedback.
All reactions