Crochet Pattern Program Instant

"stitch_id": "sc", "name": "single crochet", "abbreviation_us": "sc", "abbreviation_uk": "dc", "height_rows": 1, "width_stitches": 1, "requires_yarn_over": true, "insertion_point": "both_loops"

Your program must handle each of these sections dynamically. A modular design is best. Suggested layers: Crochet Pattern Program

| Component | Description | Example | |-----------|-------------|---------| | | Name, designer, difficulty, yarn, hook, gauge | Gauge: 16 sc x 20 rows = 4" | | Sizes | Small, medium, large with stitch counts | S (M, L): 60 (72, 84) sts | | Abbreviations key | US or UK terms | sc = single crochet | | Special stitches | Bobble, cluster, puff | Bobble: (yo, insert, pull up loop) 3x, yo pull through all | | Instructions | Rows or rounds with repeats | Row 3: [sc 2, inc] 6 times (24) | | Finishing | Seaming, blocking, edging | Fasten off, weave ends | Support multiple formats for different users: | Shape

def get_user_parameters(): item = input("Item type: ") yarn_weight = input("Yarn weight: ") desired_width_cm = float(input("Width in cm: ")) stitch_type = input("Main stitch: ") gauge_stitches_per_10cm = float(input("Gauge sts per 10cm: ")) starting_chain = int((desired_width_cm / 10) * gauge_stitches_per_10cm) return ... Support multiple formats for different users: "name": "single crochet"

| Shape | Construction | Math required | |-------|--------------|----------------| | Rectangle | Rows back and forth | length = rows × row_gauge_height | | Tube (in the round) | Continuous spiral or joined rounds | circumference = sts × stitch_width | | Circle | Rounds with regular increases | increase_rounds: sts += increment | | Triangle | Decrease at edges or center | slope = rate of decrease per row | | Sphere | Increase to max circumference then decrease | symmetric inc/dec rounds |

For amigurumi, provide a sphere/ellipsoid generator that outputs rounds with precise inc/dec counts. Implement a gauge converter . User provides gauge (e.g., 16 sts = 4") and desired size (e.g., 20" wide). Formula: stitches_needed = (desired_width_inches / 4) * gauge_stitches_per_4in

PATTERN: Simple Scarf Yarn: Worsted weight, 200 yds Hook: 5.0 mm (H-8) Gauge: 16 sc x 20 rows = 4" Abbreviations: ch = chain sc = single crochet