Challenge
Units and separators
…deck wants to count digits during a launch. Format the numbers for people: a sensible number of decimal places, thousands separators and the right units. The stored values stay exact; only the way…
9 results
Challenge
…deck wants to count digits during a launch. Format the numbers for people: a sensible number of decimal places, thousands separators and the right units. The stored values stay exact; only the way…
Challenge
…nominal with an f-string, then build the timestamp from numbers with zero padding.
Challenge
Extend the formatter from "Duration 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…
Challenge
…2021. Mission planners store every site as a pair of numbers, latitude and longitude, that always belong together and in that order. Keep the pair in a tuple, unpack it, then print it the way maps and…
Challenge
…prints after the decimal point for total and store the number in digits_after_point . Modify. Keep the raw value, and under it add the line the fuel display shows, rounded to two decimal places…
Challenge
…as 01:02:05 . In an f-string, {minutes:02d} pads a whole number with zeros to two digits. Days too Long missions count days as well. Mission control displays often write elapsed time as days, a slash…
Challenge
…a fixed-width font. The engineering office wants the same numbers as a spreadsheet. Produce both from the same data. Fixed width Print the report, WIDTH characters wide: the title and the mission line…
Challenge
…gets a third column: each system's temperature in °C. Numbers read best aligned to the right, so their decimal points line up. Give the states a width of 6, and make the temperature column 7…
Challenge
…then for the round trip. Python lets you write big numbers with underscores, like 225_000_000 , so you can read them at a glance. Delay in seconds Work out how long a radio signal takes to reach the…