Blogs


Python script to display "Jai Shree Ram" in ASCII art

In this blog post, we'll explore a Python script that generates ASCII art displaying the phrase "Jai Shree Ram." This script leverages the simplicity and readability of Python to create a visually appealing representation of the popular phrase.



The Python Script


Let's take a look at the Python script:

print(" ")
      print("  ____   ____  ____       _____ __ __  ____     ___    ___      ____    ____  ___ ___ ")
      print(" |    | /    ||    |     / ___/|  |  ||    \   /  _]  /  _]    |    \  /    ||   |   |")
      print(" |__  ||  o  | |  |     (   \_ |  |  ||  D  ) /  [_  /  [_     |  D  )|  o  || _   _ |")
      print(" __|  ||     | |  |      \__  ||  _  ||    / |    _]|    _]    |    / |     ||  \_/  |")
      print("/  |  ||  _  | |  |      /  \ ||  |  ||    \ |   [_ |   [_     |    \ |  _  ||   |   |")
      print("\  `  ||  |  | |  |      \    ||  |  ||  .  \|     ||     |    |  .  \|  |  ||   |   |")
      print(" \____j|__|__||____|      \___||__|__||__|\_||_____||_____|    |__|\_||__|__||___|___|")
                                                                                            
print(" ")

Understanding the Script

The script uses the `print` function to output each line of the ASCII art. Each line represents a part of the overall design, and when combined, they create the phrase "Jai Shree Ram" in ASCII art.

- The script starts and ends with an empty print statement to add some space around the ASCII art, making it visually more appealing.

- The ASCII art itself is formed by using various characters like underscores, vertical bars, and spaces. These characters are strategically placed to create the desired shapes and text.


Running the Script

To run the script, save it to a file with a `.py` extension, for example, `jai_shree_ram_ascii.py`. Then, open a terminal and navigate to the directory where the script is saved. Execute the following command:

python jai_shree_ram_ascii.py


This will display the "Jai Shree Ram" ASCII art in your terminal.


Feel free to customize the script or use it as inspiration for creating your own ASCII art with different phrases or designs. Python's simplicity and readability make it an excellent choice for such creative endeavors.


Happy coding, and  Jai Shree Ram! 

Comments

Free Harvard Inspired Resume Template