Results for “for”

Showing 31–40 of 202

  1. Article Python Fundamentals

    Numbers and Basic Math Operations in Python

    …has become the preferred programming language for space agencies and astronomers worldwide. In this article, we'll explore how Python handles numbers and basic mathematical operations—essential…

  2. Article Mini projects

    Managing Astronaut Medical Data with Python

    …functional program with a graphical interface, perfect for keeping our space explorers in tip-top shape! Note : You can find the complete code for this project in the " Article's code " tab above the…

  3. Challenge

    Launch schedule digest

    …to come, sort them by their window and print a digest line for each with the time left and any hold, then switch the digest to the live clock.

    Write the code Medium 3 stages project json datetime timedelta
  4. Challenge

    Retry the uplink

    Send a command up to three times, taking each result from a list of simulated radio replies, and stop at the first success with break; then wait 2, 4, 8 seconds between attempts, as real retry code…

    Write the code Medium 2 stages for loop range break retry
  5. Challenge

    Test the alert levels

    Write assert checks for alert_level(): one temperature for each level first, then the values exactly on each threshold and just below them, so a > written instead of >= can't slip through.

    Write the code Medium 2 stages testing assert functions boundaries
  6. Challenge

    Test the parser

    Write assert checks for parse_line() from "Parser function": the whole record for a good line first, then None for a blank line, a comment and a line with a missing field, so a broken parser can't…

    Write the code Medium 2 stages testing assert parsing None
  7. Challenge

    Skip blanks and comments

    Extend the feed parser so continue skips blank lines and comment lines, then report damaged lines with too few fields instead of crashing, with a count of parsed and damaged lines.

    Write the code Medium 2 stages for loop continue strip startswith
  8. Article Mini projects

    Calculating Escape Velocity in Python

    …using Python. We'll build a complete calculator that works for any celestial body, from simple formulas to an interactive program with a planet database.

  9. Challenge

    Legacy script

    A 70-line engine report repeats the same twelve lines for each engine. Restructure it into parse_feed() and summary_line() with the output unchanged to the character, then add assert tests that would…

    Fix the code Hard 2 stages project refactoring functions testing
  10. Challenge

    Shift rota

    …In turn Build rota , a list of (day, shift, name) tuples for every shift of the week, in order, taking the crew in turn. Print one line per day, then count how many times one person works two shifts…

    Write the code Hard 2 stages project scheduling lists tuples