Challenge
Duration formatter
Split 100,000 seconds of mission time into hours, minutes and seconds with // and %, pad it to a 27:46:40 clock, then add days in the DDD/HH:MM:SS format.
Showing 51–60 of 150
Challenge
Split 100,000 seconds of mission time into hours, minutes and seconds with // and %, pad it to a 27:46:40 clock, then add days in the DDD/HH:MM:SS format.
Challenge
…distance between two waypoints on a rover map with ** 2 and ** 0.5, then add a third waypoint and print each leg and the length of the whole route.
Challenge
Predict how -= and += change a fuel level, track it through three burns and a top-up, then follow a battery through one orbit. A PRIMM challenge on updating variables.
Challenge
int() cuts the decimals off, round() rounds, and round(2.5) gives 2. Predict the difference, investigate Python's rounding rule, then round a fuel reading two ways.
Challenge
…from a single f-string with \n, then add more lines and centre the title in the border.
Challenge
…lines for each engine. Restructure it into parse_feed() and summary_line() with the output unchanged to the character, then add assert tests that would catch either function breaking.
Challenge
…keep the launches still to come, sort them by their window and print a digest line for each with the time left and any hold, then switch the digest to the live clock.
Challenge
…mission summary dict into JSON text with json.dumps() and indent=2, see what True, False and None become, then keep the station's Polish letters readable and sort the keys so the files compare easily.
Challenge
…formatter": work out the seconds left from the launch time and datetime.now(timezone.utc) instead of a number typed by hand, then turn it into a countdown() that counts up with T+ after launch.
Challenge
…with with open(), one per line, read the file back and print it, then add an append_entry() function that adds lines at the end without wiping what is there.