Results for “write”

Showing 81–90 of 95

  1. 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…

    Write the code Easy 3 stages platform sys python version bug report
  2. Article Python Fundamentals

    Python print() Function

    …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…

  3. Article Mini projects

    Python Random Module

    …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 =…

  4. Article Mini projects

    Managing Astronaut Medical Data with Python

    …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…

  5. Example

    Creating Sets

    Sets store only unique elements without a specific order.

    Audio lesson set unique
  6. Challenge

    Upload router

    …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…

    Write the code Easy 2 stages if elif else or
  7. Challenge

    Extract a function

    …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…

    Fix the code Easy 2 stages functions refactoring return tuples
  8. Challenge

    Copy-pasted blocks

    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…

    Fix the code Medium 2 stages refactoring for loop tuples lists