Files
curriculum/1.solar-system/3.strings/07.the-report/index.md

1.1 KiB

type, title, xp, duration, difficulty
type title xp duration difficulty
challenge The Report 100 35 3

The Report

[INCOMING — Mission Control, Earth]

Cadet, capstone for the strings module. Combine f-strings, repetition, methods, and \n joining into one formatted output.

Repetition: "=" * 30 produces a string of 30 equals signs.

Implement format_report(name, status, location, time) that returns this exact 8-line report as a single string (lines joined with \n):

==============================
MISSION REPORT
==============================
Name: <NAME IN UPPERCASE>
Status: <status as entered>
Location: <location as entered>
Time: <time as entered>
==============================

Only the name is uppercased; other fields print as entered.

[END TRANSMISSION]

Your Task

In starter/starter.py, build the report string. Use "=" * 30 for borders, name.upper() for the name, and join lines with \n.

Objectives

  • format_report("apollo", "ok", "moon", "13:32") returns the exact 8-line string
  • Only the name is uppercased
  • Borders are 30 = characters