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…
Showing 1–10 of 11
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…
Quiz
…on quotes, escape characters, sep, end, flush and f-string formatting, with instant answers.
Challenge
…nominal with an f-string, then build the timestamp from numbers with zero padding.
Article Python Fundamentals
…telescope_temp_3) Multiple values display in formatted way Some systems provide timestamps with measured data. It's helpful to see the temperature value with the last measured date and time. This…
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…