{"id":20438702,"url":"https://github.com/anurag1101/h-shaped_pattern","last_synced_at":"2025-03-05T07:23:16.511Z","repository":{"id":258205058,"uuid":"868482664","full_name":"Anurag1101/H-Shaped_Pattern","owner":"Anurag1101","description":"A simple Python script that generates a customizable H-shaped pattern based on user input. The thickness of the pattern can be adjusted, making it a great exercise for beginners to learn about string manipulation, loops, and formatting in Python.","archived":false,"fork":false,"pushed_at":"2024-12-28T12:34:57.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-15T19:55:12.115Z","etag":null,"topics":["iteration","loops","pattern","python","python-script","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anurag1101.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-06T13:54:55.000Z","updated_at":"2024-12-28T12:35:01.000Z","dependencies_parsed_at":"2024-12-28T13:24:59.046Z","dependency_job_id":"ba40ce51-3541-4723-80c5-97f00edb3a65","html_url":"https://github.com/Anurag1101/H-Shaped_Pattern","commit_stats":null,"previous_names":["anurag1101/h-shaped_pattern"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FH-Shaped_Pattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FH-Shaped_Pattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FH-Shaped_Pattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anurag1101%2FH-Shaped_Pattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anurag1101","download_url":"https://codeload.github.com/Anurag1101/H-Shaped_Pattern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241983957,"owners_count":20052789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iteration","loops","pattern","python","python-script","python3"],"created_at":"2024-11-15T09:12:59.835Z","updated_at":"2025-03-05T07:23:16.490Z","avatar_url":"https://github.com/Anurag1101.png","language":"Python","readme":"# **H-Shaped Pattern**\n\n## **Description**:\n\nThis project generates a customizable H-shaped pattern using Python, where the size and thickness of the \"H\" can be controlled by user input. The pattern is constructed using the character 'H', and the script displays a symmetric \"H\" shape with vertical and horizontal bars that adjust based on the input value.\n\n## **Overview**:\n\nThis project is a Python script that dynamically generates an H-shaped pattern using a customizable thickness value provided by the user. The H is constructed using the letter 'H' and is visually symmetric, with vertical bars on the sides and a horizontal bar in the middle. The program is ideal for beginners to learn how to manipulate strings, use loops, and format output for creating visual patterns in Python.\n\nThis project demonstrates basic string operations, looping techniques, and the power of Python’s built-in methods like rjust(), ljust(), and center(). By altering the thickness, users can see how the size of the pattern changes, making it a good exercise for both learning and experimenting with code output.\n\n## **Motivation**:\n\nThe motivation behind this project was to build a simple yet effective Python program that shows how text-based patterns can be created and manipulated based on user input.\n\nThis script offers a fun, hands-on way for learners to experiment with basic control structures and string formatting in Python.\n\nIt also serves as a great example for:\n\nBeginners who want to improve their understanding of loops and string manipulation.\n\nAnyone looking to explore how ASCII art and similar patterns can be created programmatically.\n\n\n## **Features**:\n\n   Generates a visual H-shaped pattern based on user-defined thickness.\n   \n   Easy to modify and understand for beginners and learners.\n   \n   Shows Python's use of for loops, string formatting, and basic logic for pattern creation.\n   \n## **How It Works**:\n\n   The user is prompted to enter the thickness (height) of the \"H\".\n   \n   The program prints the top vertical bars, the middle horizontal bar, and the bottom vertical bars symmetrically, depending on the thickness.\n\n## **Character and Layout**:\n\nThe letter 'H' is used as the character to create the pattern. The overall pattern consists of:\n\nTwo vertical bars (on the left and right).\n\nOne horizontal bar that runs through the middle.\n\nDepending on the thickness provided by the user, the number of rows and columns increases, resulting in a larger or smaller \"H\".\n\n## **Key Components of the Pattern**:\n\n**Top Half (Vertical Bars):**  The first part of the H is created by printing the left and right vertical bars of the H.\n\n**Middle Section (Horizontal Bar):**  The middle part is a horizontal bar that connects both vertical sides.\n\n**Lower Half (Mirrored Vertical Bars):**  The bottom half is a mirror image of the top half, which gives the H its symmetrical appearance.\n\n**Key Python Methods Used**:\n\n**rjust():**  Right-justifies the text by padding spaces on the left.\n\n**ljust():**  Left-justifies the text by padding spaces on the right.\n\n**center():**  Centers the text by padding spaces on both sides.\n\n## **Getting Started**:\n\n**Prerequisites**:\n\nPython 3.x should be installed on your system.\n\n**How to Run the Code**:\n\n   Clone or download the repository.\n\n   Open a terminal or command prompt.\n   \n   Navigate to the folder where the script is located.\n   \n**Run the script using Python**:  python h_shaped_pattern.py\n  \n   Input the desired thickness when prompted.\n   \n## **License**:\n\nThis project is licensed under the `MIT` License.\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanurag1101%2Fh-shaped_pattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanurag1101%2Fh-shaped_pattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanurag1101%2Fh-shaped_pattern/lists"}