Skip to content

Commit 5d1fb2a

Browse files
committed
Add cli.py, change brain_games.py
1 parent a702ef3 commit 5d1fb2a

File tree

4 files changed

+29
-2
lines changed

4 files changed

+29
-2
lines changed

brain_games/cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import prompt
2+
3+
4+
def welcome_user():
5+
print("Welcome to the Brain Games!")
6+
name = prompt.string('May I have your name? ')
7+
print(f"Hello, {name}!")

brain_games/scripts/brain_games.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
from brain_games.cli import welcome_user
2+
3+
14
def main():
2-
print("Welcome to the Brain Games!")
5+
welcome_user()
36

47

58
if __name__ == "__main__":

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ version = "0.1.0"
44
description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.12"
7-
dependencies = []
7+
dependencies = [
8+
"prompt>=0.4.1",
9+
]
810

911
[build-system]
1012
requires = ["hatchling"]

uv.lock

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)