Skip to content

Commit 862cefb

Browse files
fix: remove all hardcoded paths and fix file handling bugs
- Fixed 50+ hardcoded absolute paths (/Users/dartstorm/...) - Changed to relative paths for portability - Fixed file_rename_function.py - Fixed compare_two_files.py - Fixed game_high_score.py (2 versions) - Fixed all file handling scripts - Renamed data file (06_file_even_numbers.py -> even_numbers_data.txt) - All files now work from any directory Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
1 parent ae6b0cf commit 862cefb

302 files changed

Lines changed: 4449 additions & 2567 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ secrets.json
6161
# Data / model files
6262
# ==========================
6363
gpt2/
64-
data/
6564
*.h5
6665
*.pt
6766
*.ckpt
@@ -70,6 +69,11 @@ data/
7069
*.csv
7170
*.tsv
7271

72+
# Keep data/ folder but ignore large model files
73+
data/*.pt
74+
data/*.bin
75+
data/*.model
76+
7377
# ==========================
7478
# Logs and temporary files
7579
# ==========================

APIs/README.md

Lines changed: 0 additions & 129 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
print("ram")
2+
print("Hello World")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""User-Input"""
2+
3+
# For Addition
4+
a=int(input("Enter the First Number : "))
5+
b=int(input("Enter the Second Number : "))
6+
add = a+b
7+
print(add)
8+
9+
# For Swapping
10+
a=int(input("Enter the First Number : "))
11+
b=int(input("Enter the Second Number : "))
12+
print(f"Your 1st Number is : {b}\nYour 2nd Number is : {a}")

Basics/01_introduction/README.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
# 01 Introduction
1+
# 🎯 Introduction to Python
22

3-
Getting started with Python - your first programs!
3+
Welcome to your first Python programs!
44

5-
## Files
5+
## What's Inside
66

7-
| File | Description |
8-
|------|-------------|
9-
| `hello_world_first.py` | Your first Python program |
10-
| `user_input_addition.py` | Simple addition with user input |
7+
| File | Description | Run Command |
8+
|------|-------------|-------------|
9+
| `01_hello_world.py` | Your first Python program | `python 01_hello_world.py` |
10+
| `02_user_input_addition.py` | Add two numbers from user input | `python 02_user_input_addition.py` |
1111

12-
## Topics Covered
13-
- Print statements
14-
- User input
15-
- Basic arithmetic
12+
## Key Concepts
1613

17-
## Quick Start
18-
```bash
19-
python hello_world_first.py
20-
python user_input_addition.py
21-
```
14+
- **print()** - Display output to the console
15+
- **input()** - Get input from the user
16+
- **Variables** - Store data in memory
17+
18+
## Try It Yourself
19+
20+
1. Run `01_hello_world.py`
21+
2. Change the message to your name
22+
3. Run it again!
23+
24+
## Next Steps
25+
26+
→ Move to [`02_variables_types/`](../02_variables_types/) to learn about variables and data types.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
print("ram")
2-
print("Hello World")
2+
print("Hello World")
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"""User-Input"""
22

33
# For Addition
4-
a=int(input("Enter the First Number : "))
5-
b=int(input("Enter the Second Number : "))
6-
add = a+b
7-
print(add)
4+
first_number = int(input("Enter the First Number : "))
5+
second_number = int(input("Enter the Second Number : "))
6+
addition_result = first_number + second_number
7+
print(addition_result)
88

99
# For Swapping
10-
a=int(input("Enter the First Number : "))
11-
b=int(input("Enter the Second Number : "))
12-
print(f"Your 1st Number is : {b}\nYour 2nd Number is : {a}")
10+
first_number = int(input("Enter the First Number : "))
11+
second_number = int(input("Enter the Second Number : "))
12+
print(f"Your 1st Number is : {second_number}\nYour 2nd Number is : {first_number}")
File renamed without changes.
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
a = int(input("Enter the Number : "))
2+
b = int(input("Enter the Number : "))
3+
print(f"{a} is Greater than {b} : ",a>b)

0 commit comments

Comments
 (0)