Challenge
Parse the whole feed
…kPa ENG-2: 415.0 C feed.splitlines() gives a list with one string per line. Inside the loop, line.split(",") gives the four fields, as in "Parse a telemetry line". Named fields and the time Unpack the…
Showing 61–70 of 72
Challenge
…kPa ENG-2: 415.0 C feed.splitlines() gives a list with one string per line. Inside the loop, line.split(",") gives the four fields, as in "Parse a telemetry line". Named fields and the time Unpack the…
Quiz
…on the topics of the earlier quizzes, from variables and strings to lists, dictionaries and functions. For each piece of code you decide which error it raises, read the message, or choose the fix…
Quiz
…and looping over them with items() Unpacking a tuple, a string or a dictionary into a call with * and ** Passing *args and **kwargs on to another function How it works 15 questions: 11 with one…
Challenge
…member: Kowalska Crew size: 4 Indexes start at 0, as in strings. crew[-1] is the last item whatever the list's length, and len(crew) counts the items. The whole roster Add the second in command, who…
Challenge
…at the end. A negative start counts from the end, as with strings. The window moves A new reading has arrived. Add new_reading = 772 under the list, append it to the readings, then show the new window…
Challenge
…digits, so 3725 seconds would show 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…
Quiz
…one, try the Python Math Operations Quiz or the Python Strings Quiz . What does this code print? What does this code print? Given status = "ready" , which of these lines run without an error? What…
Quiz
…What does this code print? Which of these variables hold a string ( str )? What does this code print? What does this code print? Which of these give the integer 42? What does this code print? How do…
Article Python Fundamentals
…print("No payloads — skip deployment.") Empty lists, empty strings, zero, and None all evaluate to False . Pretty much everything else is True . Nesting: decisions within decisions You can nest if…
Article Python Fundamentals
…We've all been there. That moment when inspiration strikes at the worst possible time - during your commute, waiting in line, or even in an elevator. Your brain won't let go until you test that code…