Alert banner
When something goes wrong on Python One, the console has to make sure nobody scrolls past it. Alerts are printed as a banner, framed by two lines of = signs:
============================== ALERT: Cabin pressure low ==============================
The alert system sends each alert as one piece of text, so the whole banner has to come from a single f-string.
Finish stage 1 to unlock this stage.
Print the alert as a three-line banner, with a border of exactly 30 = signs above and below:
============================== ALERT: Cabin pressure low ==============================
Use one print() with one f-string. \n inside the text starts a new line, and {'=' * 30} inside the braces gives 30 equals signs, so you don't have to count them.
Finish stage 1 to unlock this stage.
An alert has to say where the problem is and what to do. Add two lines inside the banner, still in the same f-string:
============================== ALERT: Cabin pressure low Module: Habitat 2 Action: Crew to suits ==============================
Each new line inside the text needs its own \n.
Finish stage 2 to unlock this stage.
Real alert banners often carry their title in the border. Put the word with a space on each side in the middle of the top border, keeping it 30 characters wide, and drop the label from the message line:
=========== ALERT ============ Cabin pressure low Module: Habitat 2 Action: Crew to suits ==============================
A format spec can centre text and fill the rest with a character of your choice: {' ALERT ':=^30} means "fill with =, centre, 30 wide".
Hints
Special Characters in Print
# Special characters in Python
# \n - new line
print("Mission log:\nDay 1: Launch\nDay 2: Orbit reached\nDay 3: Systems check")
# \t - tab (great for aligning columns)
print("\nPlanet\t\tDistance")
print("Mars\t\t225 mln km")
print("Jupiter\t\t778 mln km")
print("Saturn\t\t1,434 mln km")
# \\ - backslash (for file paths)
print("\nLog file: C:\\missions\\launch_data\\report.txt")
# \" and \' - quotes inside strings
print("Captain said: \"Initiate launch sequence!\"")
print('Engineer\'s reply: "All systems go."')
Separate arguments with commas. They're passed on every Run as sys.argv[1:].