seed: curriculum content
This commit is contained in:
35
1.solar-system/2.first-light/02.the-greeting/index.md
Normal file
35
1.solar-system/2.first-light/02.the-greeting/index.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
type: challenge
|
||||
title: "The Greeting"
|
||||
xp: 25
|
||||
duration: 15
|
||||
difficulty: 1
|
||||
---
|
||||
|
||||
# The Greeting
|
||||
|
||||
> **[INCOMING — Mission Control, Earth]**
|
||||
>
|
||||
> Cadet, your first Python. Implement a function called `greet` that
|
||||
> returns the exact string:
|
||||
>
|
||||
> ```
|
||||
> Hello, Python
|
||||
> ```
|
||||
>
|
||||
> Two pieces of syntax:
|
||||
>
|
||||
> - `def name():` defines a function
|
||||
> - `return value` sends a value back to whoever called it
|
||||
>
|
||||
> [END TRANSMISSION]
|
||||
|
||||
## Your Task
|
||||
|
||||
Open `starter/starter.py`. Replace `pass` with a `return` statement
|
||||
that returns `"Hello, Python"`.
|
||||
|
||||
## Objectives
|
||||
|
||||
- A function `greet` exists
|
||||
- `greet()` returns `"Hello, Python"`
|
||||
@@ -0,0 +1,3 @@
|
||||
def greet():
|
||||
"""Return the string 'Hello, Python'."""
|
||||
pass
|
||||
@@ -0,0 +1,5 @@
|
||||
from solution import greet
|
||||
|
||||
|
||||
def test_greet_returns_hello_python():
|
||||
assert greet() == "Hello, Python"
|
||||
Reference in New Issue
Block a user