Challenge
Environment check
…in different versions. Python can tell you itself. Write the first lines of a bug report for the Python One flight software, filled in by Python rather than typed by hand. Ask Python The starter code…
Showing 81–90 of 95
Challenge
…in different versions. Python can tell you itself. Write the first lines of a bug report for the Python One flight software, filled in by Python rather than typed by hand. Ask Python The starter code…
Quiz
…launch or hold, refuel or carry on. In Python you write them with if , elif and else . This free quiz has 15 short questions that check you can follow a condition to the branch that runs, and spot the…
Article Python Fundamentals
…styles in programming Python gives you three ways to write text, and each has its special uses in space programming: Apostrophes (') Perfect for simple messages: print('Ready for launch') Double…
Article Mini projects
…Rolling the Cosmic Dice Now comes the exciting part! Let's write a function that randomly selects our destination: def select_random_destination(): # Choose a random planet destination =…
Article Mini projects
…medical_records : To keep track of medical check-ups Let's write some Python code to set up our database and main class, and then instantiate that class: import sqlite3 class CosmicHealthTracker: def…
Example
Sets store only unique elements without a specific order.
Challenge
…Real file names Real uploads are messier: the new camera writes .JPEG in capitals, names arrive with stray spaces, and the telemetry team also sends .tsv files. The starter code rejects this camera…
Challenge
…format_log(..., **reading) works as if you had written sensor="ENG-2", temperature_c=455.2 yourself.
Challenge
…the ship is from each waypoint. The distance formula was written once and then pasted for the next two waypoints, with the variable names changed by hand. One wrong name in one copy and the display…
Challenge
The tank status display was written in a hurry: one block of code for tank A, then the same block copied for B and C. It works, but every change has to be made three times, and the next tank means a…