Challenge
Magic numbers
Turn the bare 9.81 and 1000 in a weight report into named constants without changing the output, then write a Mars version with constants from the start.
5 results
Challenge
Turn the bare 9.81 and 1000 in a weight report into named constants without changing the output, then write a Mars version with constants from the start.
Challenge
…find the leg that doesn't fit, convert it with a named constant, then convert a lander's feet per second to metres.
Challenge
…by speed. The speed of light is already in the code as a constant, in kilometres per second. Minutes and seconds Nobody talks about a delay of 750.5 seconds. Show it as whole minutes and seconds…
Challenge
Ask for an engine burn length with input(), turn it into a number with float() and work out the propellant it uses, then read the tank level too and show what the burn leaves.
Challenge
…over several passes. Add PASS_S = 600 next to the other constant and print how many passes the file needs: Downlink time: 27 min 47 s Ground station passes: 3 A download that takes exactly 30 minutes…