Challenge
Approved payloads
…list Strip the spaces and make it upper case, then use if with in . For " pl-117 " it prints the first line.
Showing 21–30 of 100
Challenge
…list Strip the spaces and make it upper case, then use if with in . For " pl-117 " it prints the first line.
Challenge
Replace a nine-branch elif that maps planets and the Moon to surface gravity with a dict and one get() lookup, keeping the output exactly the same, then loop over the dict for a weight table.
Challenge
Print a pre-flight checklist numbered from 1 with enumerate(list, start=1), then tick off the items the crew has already done with [x] and leave the rest as [ ].
Article Mini projects
…# Trust whatever time is given (or system time) if current_time is None: current_time = datetime.now() # Check if enough time has passed if self.dose_history: last_dose = self.dose_history[-1]…
Article Mini projects
…a ball upward. It always falls back down, right? But what if you threw it so hard that it never came back? That's escape velocity - the minimum speed needed to break free from a planet's gravity…
Article Mini projects
…above the content of this article. Feel free to peek ahead if you're curious, but we recommend following along step-by-step for the best learning experience! 1. Setting Up Our Python Environment…
Article Python Fundamentals
…for scan_y in range(10): for scan_x in range(10): # Check if there's a rover at this position rover_found = None for x, y, name in lost_rovers: if x == scan_x and y == scan_y: rover_found = name break…
Challenge
…0.0-450.0 Look at the decision line it prints after that. If it seems wrong to you, you are right: that is the fifth bug, for stage 2. This stage checks the lines above. Make it right ENG-2 is over…
Challenge
…whoever changes the pipeline next must find out at once if something broke. Write them. The hidden tests plant three bugs, one at a time, and your tests must catch every one. Test parse_row() Write…
Article Python Fundamentals
If you've written even a few lines of Python, you've already used functions. print() is one. So are len() , input() and int() . Somebody wrote them, gave each one a name, and now you can use them…