|
| 1 | +#!/usr/bin/env python3 |
| 2 | +"""Origami Instructions Guide - Step-by-step folding instructions from preset selection""" |
| 3 | + |
| 4 | +origami_library = { |
| 5 | + "1": { |
| 6 | + "name": "Traditional Crane", |
| 7 | + "difficulty": "Intermediate", |
| 8 | + "steps": [ |
| 9 | + "Start with a square piece of paper, colored side down", |
| 10 | + "Fold in half diagonally both ways, then unfold", |
| 11 | + "Fold in half horizontally both ways, then unfold", |
| 12 | + "Bring the top three corners down to the bottom corner (waterbomb base)", |
| 13 | + "Fold the top triangular flaps into the center", |
| 14 | + "Fold the top down over the flaps", |
| 15 | + "Unfold the last two steps", |
| 16 | + "Petal fold: Lift the first layer up and fold the sides inward", |
| 17 | + "Flip and repeat the petal fold on the other side", |
| 18 | + "Fold both flaps up to create the legs", |
| 19 | + "Inside reverse fold one leg to make the head", |
| 20 | + "Fold down the wings and your crane is complete!" |
| 21 | + ] |
| 22 | + }, |
| 23 | + "2": { |
| 24 | + "name": "Paper Boat", |
| 25 | + "difficulty": "Easy", |
| 26 | + "steps": [ |
| 27 | + "Start with a rectangular piece of paper", |
| 28 | + "Fold the paper in half lengthwise", |
| 29 | + "Fold in half widthwise, then unfold", |
| 30 | + "Fold the top corners down to the center crease", |
| 31 | + "Fold the bottom edge up on both sides", |
| 32 | + "Open from the bottom and flatten into a square", |
| 33 | + "Fold the bottom corners up on both sides", |
| 34 | + "Open from the bottom and flatten again", |
| 35 | + "Gently pull the top corners apart", |
| 36 | + "Your boat is ready to sail!" |
| 37 | + ] |
| 38 | + }, |
| 39 | + "3": { |
| 40 | + "name": "Jumping Frog", |
| 41 | + "difficulty": "Easy", |
| 42 | + "steps": [ |
| 43 | + "Start with a square piece of paper", |
| 44 | + "Fold in half lengthwise, then unfold", |
| 45 | + "Fold the top corners down to the center line", |
| 46 | + "Fold the angled sides to the center", |
| 47 | + "Fold the bottom edge up to the base of the triangle", |
| 48 | + "Fold the bottom corners up and out", |
| 49 | + "Fold the bottom edge up again", |
| 50 | + "Fold in half, bringing the bottom to the back", |
| 51 | + "Fold the back layer down to create a step", |
| 52 | + "Press on the frog's back to make it jump!" |
| 53 | + ] |
| 54 | + }, |
| 55 | + "4": { |
| 56 | + "name": "Simple Butterfly", |
| 57 | + "difficulty": "Easy", |
| 58 | + "steps": [ |
| 59 | + "Start with a square piece of paper, colored side down", |
| 60 | + "Fold in half diagonally, then unfold", |
| 61 | + "Fold in half diagonally the other way", |
| 62 | + "Fold the top corner down to the bottom corner", |
| 63 | + "Fold a small triangle at the top down", |
| 64 | + "Flip the paper over", |
| 65 | + "Fold in half vertically, bringing the wings together", |
| 66 | + "Your butterfly is complete!" |
| 67 | + ] |
| 68 | + } |
| 69 | +} |
| 70 | + |
| 71 | +def display_menu(): |
| 72 | + print("\n=== ORIGAMI INSTRUCTIONS GUIDE ===") |
| 73 | + print("\nAvailable Origami Designs:") |
| 74 | + for key, origami in origami_library.items(): |
| 75 | + print(f"{key}. {origami['name']} - Difficulty: {origami['difficulty']}") |
| 76 | + print("0. Exit") |
| 77 | + |
| 78 | +def display_instructions(origami_data): |
| 79 | + print(f"\n{'='*50}") |
| 80 | + print(f"{origami_data['name'].upper()}") |
| 81 | + print(f"Difficulty Level: {origami_data['difficulty']}") |
| 82 | + print(f"{'='*50}\n") |
| 83 | + for i, step in enumerate(origami_data['steps'], 1): |
| 84 | + print(f"Step {i}: {step}") |
| 85 | + input("\nPress Enter for next step..." if i < len(origami_data['steps']) else "\nPress Enter to return to menu...") |
| 86 | + |
| 87 | +def main(): |
| 88 | + while True: |
| 89 | + display_menu() |
| 90 | + choice = input("\nSelect an origami design (0-4): ").strip() |
| 91 | + if choice == "0": |
| 92 | + print("\nHappy folding! Goodbye!") |
| 93 | + break |
| 94 | + elif choice in origami_library: |
| 95 | + display_instructions(origami_library[choice]) |
| 96 | + else: |
| 97 | + print("\nInvalid choice. Please try again.") |
| 98 | + |
| 99 | +if __name__ == "__main__": |
| 100 | + main() |
0 commit comments