Skip to content

Add optional name argument to hello.py greeting script#869

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-greeting-script-again
Draft

Add optional name argument to hello.py greeting script#869
Copilot wants to merge 2 commits intomainfrom
copilot/add-greeting-script-again

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

hello.py printed a static Hello World with no argument support. This updates it to accept an optional name and use proper greeting formatting.

Changes

  • hello.py: Adds greet(name) function returning Hello, {name}!; reads sys.argv[1] as optional name with whitespace-stripped fallback to "World"
python3 hello.py          # Hello, World!
python3 hello.py Alice    # Hello, Alice!
python3 hello.py "   "    # Hello, World!

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: OliveMild <256848148+OliveMild@users.noreply.github.com>
Copilot AI changed the title [WIP] Add greeting script Add optional name argument to hello.py greeting script Mar 16, 2026
Copilot AI requested a review from OliveMild March 16, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants