Challenge
Approved payloads
Check whether a payload ID is on the approved list with in, which matches whole items rather than parts of text, then normalise IDs typed by hand and print a clear cleared or not-cleared message.
10 results
Challenge
Check whether a payload ID is on the approved list with in, which matches whole items rather than parts of text, then normalise IDs typed by hand and print a clear cleared or not-cleared message.
Example
Lists store multiple elements in a specific order. Basics of working with lists.
Article Python Fundamentals
…# degrees "period": 92.68, # minutes } # Crew roster crew_members = [ "Sarah Connor", "John Smith", "Maria Garcia", "Yu Chen" ] # Mission checkpoints (immutable) mission_phases = ( "Launch", "Earth…
Article Python Fundamentals
…Temperature is stable Oxygen levels normal All crew members safe """ print(message) Using backslash to handle special characters Sometimes you need to include quotes or special characters in your…
Article Python Fundamentals
…, != , < , > , <= , >= Logical operators: and , or , not Membership: in , not in Truthiness: values like 0 , "" , [] , None , False are treated as False in conditions Example combining checks…
Example
Operator // for floor division and % for remainder (modulo) in Python.
Challenge
…turns each list into one line. Small letters Two new crew members have names that start with a small letter: de Vries and van Dijk . The starter code puts them after Tanaka, because Python sorts all…
Article Python Fundamentals
…of what we've covered. It prints a short report for crew members heading to different destinations: what their scale would read there, and how long a radio message takes to get home. SPEED_OF_LIGHT =…
Article Python Fundamentals
…actually make sense. When I recommend books to new team members who need to get up to speed with Python for our satellite data processing work, this is usually my first pick. The third edition is…
Article Mini projects
…save astronaut information. It's like registering new crew members for our space mission! 5. Medical Check-ups Now, let's add fields for medical check-ups. We need to: display a form using…