Jai Shree Ram using Python

The Coding Hubs
4 Min Read

Introduction

Here’s the Python code to write “Jai Shree Ram” on the screen using the turtle library:

Before you run the code:

Install the turtle module:

  • Open your terminal or command prompt.
  • Type “pip install turtle” and press Enter.

To run the code:

  • Copy and paste the code into your preferred text editor or IDE (like VS Code).
  • Save the file with a .py extension (e.g., jaishreeram.py).

Run the code:

  • In your terminal, navigate to the directory where you saved the file.
  • Type python jaishreeram.py (or the name you chose) and press Enter.

That’s it! The code will display “Jai Shree Ram” on your screen using the turtle graphics library.

from turtle import*
title(‘Jai Shree Ram’)
bgcolor(‘black’)
pensize(5)
pencolor(“orange”)
Ram_naam = [जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम,जय श्री राम,जय श्री राम,
जय श्री राम,जय श्री राम]
angle = 360/49
penup()
sety(-1)
for i in range(50):
left(angle)
forward(260)
write(Ram_naam[i], align=“right”,
font=(‘Arial’,12,“bold”))
backward(260)
penup()
goto(-40,20)
pendown()
write(“|| राम ||”, font=(“Arial”, 60,“normal”),
align=“center”)
hideturtle()
done()

I hope that you would have liked reading this article and the information given by me about Python Turtle and you would have enjoyed using the code of Jai Shri Ram.

written by: The Coding Hubs

Code by: programmingkakeeda

Read More : Quiz Game with Python: A Step-by-Step Guide

Share This Article
Follow:
I'm a Programmer and Content Creator, crafting code and blogs since 2015. Passionate about simplifying complex ideas, I thrive on sharing knowledge through programming projects and engaging articles.
1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *