seed: curriculum content

This commit is contained in:
2026-05-07 14:32:44 +00:00
parent 9258534803
commit ec76f4f56b
100 changed files with 2846 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
---
type: challenge
title: "The Prompt"
xp: 50
duration: 25
difficulty: 2
---
# The Prompt
> **[INCOMING — Mission Control, Earth]**
>
> Cadet, every program takes input. In this stage, your functions
> receive input as *parameters* — values passed in by whoever called
> you.
>
> *f-strings* (formatted strings) embed values directly into text:
>
> ```python
> name = "Vega"
> f"Hello, {name}!" # → "Hello, Vega!"
> ```
>
> Implement `welcome(name, planet)` that returns:
>
> ```
> Welcome, <name> from <planet>.
> ```
>
> [END TRANSMISSION]
## Your Task
Open `starter/starter.py`. Use an f-string to return the welcome
message.
## Objectives
- `welcome("Vega", "Mars")``"Welcome, Vega from Mars."`
- Works for any name and planet

View File

@@ -0,0 +1,8 @@
def welcome(name, planet):
"""Return a welcome string of the form:
"Welcome, <name> from <planet>."
welcome("Vega", "Mars") -> "Welcome, Vega from Mars."
"""
pass

View File

@@ -0,0 +1,13 @@
from solution import welcome
def test_vega_mars():
assert welcome("Vega", "Mars") == "Welcome, Vega from Mars."
def test_halo_earth():
assert welcome("Halo", "Earth") == "Welcome, Halo from Earth."
def test_orbit_seven_europa():
assert welcome("Orbit-7", "Europa") == "Welcome, Orbit-7 from Europa."