Skip to content

Commit 5137e1b

Browse files
Add Age Calculator Python project
1 parent df255d8 commit 5137e1b

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

hello-world/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Hello World in Python
2+
3+
This is a simple beginner-friendly Python project that prints a personalized "Hello, World" message.
4+
5+
## File: `hello.py`
6+
7+
This script asks for the user's name and prints a greeting.
8+
9+
### How it works:
10+
- Takes input from the user
11+
- Uses a function `say_hello(name)` to return a greeting message
12+
- Prints the final message
13+
14+
### To run:
15+
```bash
16+
python hello.py
17+
18+
Example Output:
19+
Enter your name: Shailaja
20+
Hello, Shailaja! Welcome to the world of open source.
21+
22+
23+
🌟 Who is this for?
24+
Perfect for first-time contributors to practice creating a Python script and contributing to open-source.
25+
26+
27+
Contribution Steps:
28+
29+
Fork the repo
30+
Clone to your system
31+
Create a branch
32+
Add your project
33+
Commit and push
34+
Create a Pull Request (PR)

hello-world/hello.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def say_hello(name):
2+
return f"Hello, {name}! Welcome to the world of open source."
3+
4+
# Example usage
5+
if __name__ == "__main__":
6+
user_name = input("Enter your name: ")
7+
print(say_hello(user_name))

0 commit comments

Comments
 (0)