Drawing Amazing Graphics In Turtle:

Drawing Amazing Graphics In Turtle:

Share It With Your Firends:

turtle is a pre-installed Python library thatΒ enables users to create pictures and shapes by providing them with a virtual canvas. The onscreen pen that you use for drawing is called the turtle and this is what gives the library its name.

import turtle
from turtle import *
import random


speed(speed = 'fastest')


def draw(n, x, angle):
for i in range(n):
colormode(255)
a = random.randint(0, 255)
b = random.randint(0, 255)
c = random.randint(0, 255)

pencolor(a, b, c)
fillcolor(a, b, c)
begin_fill()

for j in range(5):
forward(5 * n - 5 * i)
right(x)
forward(5*n - 5*i)
right(75 - x)

end_fill()
rt(angle)


n = 30
x = 144
angle = 18

draw(n, x, angle)
turtle.done()

Share It With Your Friends

Leave a Reply

Recent Posts

  • All Post
  • A.I.
  • AI
  • c
  • c++
  • computer
  • cryptocurrency
  • database
  • digital marketing
  • finance
  • hacking
  • HTML
  • java
  • Marketing
  • network
  • other
  • programming
  • python
  • react
  • social
  • Tools
  • Uncategorized
  • web devlopment
    •   Back
    • drawing In Python
DIY AI Voice Assistant In Python

September 8, 2023

Build your own AI assistant with Python! Learn to recognize voice commands, generate responses, and more. Create your virtual companion…

share it

Recent Posts

  • All Post
  • A.I.
  • AI
  • c
  • c++
  • computer
  • cryptocurrency
  • database
  • digital marketing
  • finance
  • hacking
  • HTML
  • java
  • Marketing
  • network
  • other
  • programming
  • python
  • react
  • social
  • Tools
  • Uncategorized
  • web devlopment
    •   Back
    • drawing In Python

Additional Content

CodeWithAM

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus luctus.

Products

Automated Chatbot

Data Security

Virtual Reality

Communication

Support

Services

FAQ's

Privacy Policy

Terms & Condition

Team

Contact Us

Company

About Us

Services

Features

Our Pricing

Latest News

Β© 2023 Codewitham