Results for “print”

Showing 131–140 of 237

  1. Challenge

    JSON out

    …takes JSON. The summary already exists as a Python dict. Printing it with print(summary) looks close, but single quotes, True and None aren't JSON, and the archive rejects it. Produce real JSON text…

    Write the code Easy 2 stages json json.dumps modules import
  2. Challenge

    Paged results

    …pages Merge the pages into one list called launches , then print how many launches there are, and each one: Launches: 7 Lumen-1: success Kestrel-4: success Aurora Relay: failure Kestrel-5: success…

    Write the code Medium 2 stages for loop while loop extend break
  3. Challenge

    Skip blanks and comments

    …comment line. Skip blank lines and comment lines, so it prints only the readings: 09:30:05 ENG-2: 412.5 C 09:30:05 TANK-1: 78.3 % 09:30:10 CABIN: 101.2 kPa 09:30:10 ENG-2: 415.0 C At the top of the…

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

    Ground station pick

    …of longitudes. Pick the one the spacecraft is over and print it: from 60 to 180 New Norcia from -60, below 60 Cebreros below -60 Malargüe For 100.0 it's Ground station: New Norcia . Go through the…

    Write the code Easy 2 stages if elif else ranges
  5. Challenge

    Redact the access code

    …only its last four characters show, the way bank cards are printed on receipts, then do it inside a real log line. Mask the code Replace every character of the access code except the last four with *…

    Write the code Medium 2 stages strings slicing len replace
  6. Challenge

    Downlink time

    …the link speed in Mbit/s, both as decimal numbers, and print the transfer time in minutes with one decimal place. For a 450 MB file at 2 Mbit/s: Downlink time: 30.0 min Forget the 8 and the answer…

    Write the code Medium 3 stages input float bits and bytes round
  7. Challenge

    Duration formatter

    …the minutes left over and the seconds left over, and print: 27 h 46 min 40 s // divides and keeps only the whole part; % gives what's left over. An hour has 3600 seconds and a minute 60. Clock format…

    Write the code Easy 3 stages floor division modulo // %
  8. Challenge

    Flight software review

    …455.0 outside 0.0-450.0 Look at the decision line it prints after that. If it seems wrong to you, you are right: that is the fifth bug, for stage 2. This stage checks the lines above. Make it right…

    Fix the code Hard 2 stages project debugging SyntaxError TypeError
  9. Challenge

    Validate a cargo record

    …mass for a mass below 0. The loop at the bottom then prints: CG-0042: OK CG-0043: missing item, negative mass CG-0044: missing mass_kg CG-42: OK Start with problems = [] , append each problem you…

    Write the code Medium 2 stages functions return lists validation
  10. Challenge

    Sign-up cleanup

    …, which trims the email and makes it lower case. Print every sign-up, cleaned: Anna Kowalska <anna.kowalska@example.org> Kenji Tanaka <k.tanaka@example.org> Chioma Okafor <chioma.okafor@example.org>…

    Write the code Medium 2 stages project strings strip split