Challenge
sort() returns None
…in place, then sort readings from highest to lowest and keep the top three.
Showing 71–80 of 233
Challenge
…in place, then sort readings from highest to lowest and keep the top three.
Challenge
Check whether a path starts with telemetry/ and ends with .csv using startswith() and endswith(), see why in isn't enough, then clean up paths with Windows backslashes, capitals and spaces first.
Challenge
…can't be changed. Predict the crash, find out what methods and slices really give, build a new string instead, then swap a letter in the middle of a code.
Challenge
…print each with a label, then turn the value into a number and convert it to kelvin.
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.
Article Mini projects
Remember that scene in Project Hail Mary [spoiler alert] by Andy Weir where Dr. Ryland Grace outsmarts the ship's computer? He's in pain, asks for painkillers, and the computer refuses because he…