Created
September 24, 2025 04:06
-
-
Save SnakeO/56816fdc42de14114bb7d2dc63202ac6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def cut_grooves(block: str): | |
| print(f"Cutting grooves into {block}...") | |
| return "grooved wood" | |
| def apply_glue(wood: str): | |
| print(f"Applying glue to {wood}...") | |
| return "glued wood" | |
| def insert_graphite(wood: str): | |
| print(f"Inserting graphite into {wood}...") | |
| return "graphite wood" | |
| def sandwich_layers(wood: str): | |
| print(f"Sandwiching layers around {wood}...") | |
| return "sandwiched wood" | |
| def smooth_surface(wood: str): | |
| print(f"Smoothing surface of {wood}...") | |
| return "smooth wood" | |
| def compress(wood: str, hours: int): | |
| print(f"Compressing {wood} for {hours} hour(s)...") | |
| return "compressed wood" | |
| def slice_pencils(wood: str): | |
| print(f"Slicing {wood} into pencils...") | |
| return ["pencil1", "pencil2", "pencil3"] | |
| def paint_pencil(pencil: str, coats: int): | |
| for coat in range(1, coats + 1): | |
| print(f"Applying paint coat {coat} to {pencil}...") | |
| print(f"Painting black stripe on {pencil}...") | |
| return f"painted {pencil}" | |
| def stamp_brand(pencil: str): | |
| print(f"Stamping brand on {pencil}...") | |
| return f"stamped {pencil}" | |
| def add_eraser(pencil: str): | |
| print(f"Attaching eraser to {pencil}...") | |
| return f"{pencil} with eraser" | |
| def sharpen_pencil(pencil: str): | |
| print(f"Sharpening {pencil}...") | |
| return f"finished {pencil}" | |
| # Run the process | |
| def create_pencil(): | |
| wood = cut_grooves("wood block") | |
| glued = apply_glue(wood) | |
| with_graphite = insert_graphite(glued) | |
| sandwiched = sandwich_layers(with_graphite) | |
| smooth = smooth_surface(sandwiched) | |
| compressed = compress(smooth, 1) | |
| pencils = slice_pencils(compressed) | |
| finished_pencils = [] | |
| for pencil in pencils: | |
| painted = paint_pencil(pencil, 4) | |
| stamped = stamp_brand(painted) | |
| with_eraser = add_eraser(stamped) | |
| sharpened = sharpen_pencil(with_eraser) | |
| finished_pencils.append(sharpened) | |
| print("\nAll pencils created successfully!") | |
| return finished_pencils | |
| # Run it | |
| create_pencil() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment