Results for “index”

Showing 31–40 of 41

  1. Article Python Fundamentals

    Nested Loops in Python

    …results. Always use different names. Mistake 2: Wrong Indentation # Where should this print go? for y in range(3): for x in range(3): print(f"({x}, {y})", end=" ") print() # ← This executes after each…

  2. Challenge

    Telemetry pipeline

    …rejected and the alerts list, written with json.dump() , indent=2 and ensure_ascii=False . Then print one last line: Saved summary.json The hidden tests open summary.json and compare it with what they…

    Write the code Hard 3 stages project csv json files
  3. Challenge

    Launch counter crash

    …find out why, then fix it in a way that keeps the function independent of the rest of the program. Predict and run Don't run the code yet. Read it and decide what it will print. Write your guess in…

    Fix the code Medium 3 stages functions scope UnboundLocalError global
  4. Challenge

    API response

    …whole response. After the three lines, print every field, indented by two spaces, in the order the response has them: Launch: Lumen-3 Provider: JAXA Status: Go All fields: id…

    Write the code Easy 2 stages dictionaries keys items JSON
  5. Challenge

    Skip blanks and comments

    …or starts with # . Stripping first matters: one comment is indented, and a line can hold nothing but spaces. Damaged lines A reading arrived cut off: 2026-03-14T09:30:10Z,TANK-1 has only two fields…

    Write the code Medium 2 stages for loop continue strip startswith
  6. Challenge

    Check every reading

    …= 412.5 with for temperature_c in temperatures_c: , then indent the whole check and the print under it, so they run once for each temperature. A summary line After the list, print a summary: how many…

    Write the code Easy 2 stages for loop lists if elif
  7. Challenge

    Alert level

    …else for OK. "From 400" includes 400 itself, so use >= . Indent each branch's line by four spaces. A status line The console shows the sensor, the reading and the level on one line. Add sensor =…

    Write the code Easy 2 stages if elif else comparisons
  8. Challenge

    Missing reading

    …and move the existing chain and its print into the else , indented by four more spaces. Don't use if not temperature_c : 0 °C is a real reading. An empty field Readings now come from the telemetry…

    Write the code Medium 2 stages if else None is None