Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d28d9f2
Create black.yml
TheM1ddleM1n Sep 19, 2025
635b9d0
Create CI.yml
TheM1ddleM1n Sep 19, 2025
93f5bc0
Create updated-readme.yml
TheM1ddleM1n Sep 19, 2025
41aa9c0
Update README.md
TheM1ddleM1n Sep 19, 2025
7ad11f9
🧠 Update README stats
actions-user Sep 19, 2025
1c55b07
Update classes_objs.py
TheM1ddleM1n Sep 19, 2025
2563ae3
🧠 Update README stats
actions-user Sep 19, 2025
16056e3
Update classes_objs.py
TheM1ddleM1n Sep 19, 2025
ba4e8bd
🧠 Update README stats
actions-user Sep 19, 2025
6b478f8
Update solve2.py
TheM1ddleM1n Sep 19, 2025
676c114
🧠 Update README stats
actions-user Sep 19, 2025
f8d0200
Update solve_5.py
TheM1ddleM1n Sep 19, 2025
beee3b6
🧠 Update README stats
actions-user Sep 19, 2025
e9f9189
Update solve_8.py
TheM1ddleM1n Sep 19, 2025
2f15987
🧠 Update README stats
actions-user Sep 19, 2025
6fc5778
Update intro.py
TheM1ddleM1n Sep 19, 2025
a6522ec
🧠 Update README stats
actions-user Sep 19, 2025
a6fceb4
Update Rechner.py
TheM1ddleM1n Sep 19, 2025
7b15af9
🧠 Update README stats
actions-user Sep 19, 2025
f63e32d
Update index2.py
TheM1ddleM1n Sep 19, 2025
4ff8b03
🧠 Update README stats
actions-user Sep 19, 2025
a148258
Update index2.py
TheM1ddleM1n Sep 19, 2025
db9edab
🧠 Update README stats
actions-user Sep 19, 2025
14a9244
Update classes_objs.py
TheM1ddleM1n Sep 19, 2025
2eb6ed2
🧠 Update README stats
actions-user Sep 19, 2025
c6e4c52
Update passwort.py
TheM1ddleM1n Sep 19, 2025
ae24012
🧠 Update README stats
actions-user Sep 19, 2025
c2699bf
Update classes_objs.py
TheM1ddleM1n Sep 19, 2025
f1894a2
🧠 Update README stats
actions-user Sep 19, 2025
67bfdf4
🧠 Update README stats
actions-user Sep 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://docs.astral.sh/ruff
name: ci
on:
push:
# branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: pipx run codespell
ruff_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: pipx run ruff check --output-format=github
ruff_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: pipx run ruff format
26 changes: 26 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 🖤 Black Formatter

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
format:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install Black
run: pip install black

- name: Run Black
run: black .
38 changes: 38 additions & 0 deletions .github/workflows/updated-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 🧠 Update README Stats

on:
push:
branches: [main]
schedule:
- cron: '0 0 * * *' # Every day at midnight

jobs:
update-readme:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Count Python files and lines
run: |
PY_FILES=$(find . -name "*.py" | wc -l)
TOTAL_LINES=$(find . -name "*.py" -exec cat {} + | wc -l)
echo "PY_FILES=$PY_FILES" >> $GITHUB_ENV
echo "TOTAL_LINES=$TOTAL_LINES" >> $GITHUB_ENV

- name: Update README.md
run: |
STATS="📄 Total lines of code: $TOTAL_LINES\n🐍 Number of Python files: $PY_FILES"
DATE="🕒 Last updated: $(date -u +"%Y-%m-%d %H:%M UTC")"

sed -i "/<!-- STATS:START -->/,/<!-- STATS:END -->/c\\<!-- STATS:START -->\n$STATS\n<!-- STATS:END -->" README.md
sed -i "/<!-- UPDATED:START -->/,/<!-- UPDATED:END -->/c\\<!-- UPDATED:START -->\n$DATE\n<!-- UPDATED:END -->" README.md

- name: Commit changes
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "actions@github.com"
git add README.md
git commit -m "🧠 Update README stats"
git push
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@ Each one is a small step toward becoming a full-stack developer.
## 📆 Day Counter
✨ **Day 8 of Learning Python** ✨

<!-- STATS:START -->
📄 Total lines of code: 1280
🐍 Number of Python files: 21
<!-- STATS:END -->

<!-- UPDATED:START -->
🕒 Last updated: 2025-09-20 00:59 UTC
<!-- UPDATED:END -->


20 changes: 8 additions & 12 deletions classes_objs.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,18 @@ def animal_speak(animal):
animal_speak(pferd) # Neigh
animal_speak(eule) # Hoot



### Try Area

## Basic Functions
'''
functions are simple, and does'nt include any aparameters or return values
and performs a single task, like so...;
'''
def greet():
print("Hallo, Leute!")
"""
Functions are simple, don't include any parameters or return values,
and perform a single task, like so...
"""

def greet_group():
print("Hallo, Leute!")

## Functions with parameters
#: functions accepting parameters are more flexible and readable.
def greet(name):
def greet_person(name):
print(f"Hallo, {name}")


Expand Down Expand Up @@ -156,7 +152,7 @@ def add_all(*args): # With *args
return sum(args)
print(add_all(1, 2, 3, 4, 5))

def print_info(**kwargs) # With **kwargs
def print_info(**kwargs): # With **kwargs
for key, value in kwargs.items():
print(f"{key}: {value}")

Expand Down
4 changes: 2 additions & 2 deletions index2.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def add_to_total(num):
### Try 7
##:Use loops and functions to eliminate duplication.
'''
users = ["Herr Goethe", "Frau Merkel", "Frau Ine", "Herr Geoff"]
users = ["Herr Goethe", "Frau Merkel", "Frau Lines", "Herr Geoff"]

# - better ✔

Expand Down Expand Up @@ -235,7 +235,7 @@ def greet_users(users):
'''

###:F-Strings
##:Formatted strin literals
##:Formatted string literals
##{f-strings} make formatting strings easier and more readable than the traditional format() method.
'''name = 'Henry'
age = 18
Expand Down
10 changes: 5 additions & 5 deletions intro.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
alt = "18"
vollName = vorName +" "+ nachName

print("Mein Vorname ist " + vorName)
print("Mein Nachname ist " + nachName)
print("Meine Alter ist " + alt)
print("Mein Name in voll ist " + vollName)"""
print("Mein Vorname is " + vorName)
print("Mein Nachname is " + nachName)
print("Meine Alter is " + alt)
print("Mein Name in voll is " + vollName)"""

######### Avoiding Type Errors With STR() Function #######
"""alt = 18
Expand Down Expand Up @@ -316,7 +316,7 @@
# print(my_foods)
# print(friends_foods)

##### ORGANIZING A LIST --- SORTIN A LIST ######
##### ORGANIZING A LIST --- SORTING A LIST ######
#cars = ["bmw", "audi", "toyota", "subaru"]
# cars.sort()
# #print(cars)
Expand Down
4 changes: 2 additions & 2 deletions simple_py_program/Rechner.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
if zahl2 != 0:
ergebnis = zahl1 / zahl2
else:
ergebnis = "Teilen durch Null(0) ist nicht erlaubt"
ergebnis = "Teilen durch Null(0) is nicht erlaubt"
else:
ergebnis = "Syntaxfehler!"

print("Ergebnis:", ergebnis)
print("Ergebnis:", ergebnis)
13 changes: 7 additions & 6 deletions simple_py_program/passwort.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#####Practice 4
##Simple Password Checker
Passwort_prüfen = input("Passwort eingeben: ")
hat_Nummer = any(char.isdigit() for char in Passwort_prufen)
##### Practice 4
## Simple Password Checker

if len(Passwort_prüfen) > 8 and hat_Nummer:
password = input("Passwort eingeben: ")
has_number = any(char.isdigit() for char in password)

if len(password) > 8 and has_number:
print("starkes Passwort")
else:
print("schwaches Passwort!, Versuch es noch einmal...")
print("schwaches Passwort! Versuch es noch einmal...")
2 changes: 1 addition & 1 deletion simple_python_problem/solve2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
gen_Message += "\nThe party will take place at a newly allocated hall, more info's later.\n"
print(gen_Message)

##Add three more guests, one at the beggining[0], middle[?], and end of your list
##Add three more guests, one at the beginning[0], middle[?], and end of your list
invited_Friends.insert(0, "Maxwell") #Beginning
invited_Friends.insert(2, "Thomas") #Middle
invited_Friends.insert(5, "Joseph") #End
Expand Down
10 changes: 5 additions & 5 deletions simple_python_problem/solve_5.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
########### ASSIGNMENT 5 ####################
## Make a list of your three favorite fruits,
# and then write a series of independent if statements tha check for certain fruits in your list
# Write five if statement. Each should check whether a certain kind of fruit is in your list
# If the fruit is in your list, the if block should print a statement, such as "You like Banana"
# and then write a series of independent if statements that checks for certain fruits in your list.
# Write five if statement. Each should check whether a certain kind of fruit is in your list.
# If the fruit is in your list, the if block should print a statement, such as "You like Bananas"

fav_Fruits = ["Orange", "Mango", "Pawpaw"]

Expand All @@ -13,7 +13,7 @@
if "Mango" in fav_Fruits:
print("Henry likes Mangoes")
if "Lemon" in fav_Fruits:
print("Henry like Lemon")
print("Henry like Lemons")
if "Pawpaw" in fav_Fruits:
print("Henry likes Pawpaw")
print("\nAll Done")
print("\nAll Done!")
4 changes: 2 additions & 2 deletions simple_python_problem/solve_8.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

friends_Phones.append("Iphone")

##Prove that you have two separate lists and print a message with the separarte lists
##Prove that you have two separate lists and print a message with the separate lists
print(phones)
print(friends_Phones)
print(friends_Phones)