Posts

Draw Among Us Game Character using python turtle graphics

  Source Code :- import turtle BODY_COLOR = 'Red' BODY_SHADOW = '' GLASS_SHADOW = '' GLASS_COLOR = 'skyblue' s= turtle.getscreen() t= turtle.Turtle() # WE WILL DIVIDE CHARACTER INTO 3 PARTS : # BODY , GLASS, BACKPACK # FIRST CREATE BODY() def body():     t.pensize(20)     t.fillcolor(BODY_COLOR)     t.begin_fill()     #Right side     t.right(90)     t.forward(50)     t.right(180)     t.circle(40, -180)     t.right(180)     t.forward(200)          #head curve     t.right(180)     t.circle(100, -180)     #Left side     t.backward(20)     t.left(15)     t.circle(500,-20)     t.backward(20)          #t.backward(200)     t.circle(40,-180)     t.left(7)     t.backward(50)     #hip     t.up()     t.left(90)  ...

Wish Happy Friendship Day using Python turtle graphics

  Source Code:- import turtle screen=turtle.Screen() trtl=turtle.Turtle() screen.setup(620,620) screen.bgcolor('white') clr=['red','green','blue','yellow','purple'] trtl.pensize(4) trtl.shape('turtle') trtl.penup() trtl.pencolor('red') trtl.write(str(),align="center",font=("Arial", 12, "normal"))      trtl.home() trtl.setpos(0,-250) trtl.pendown() trtl.pensize(10) trtl.pencolor('blue') trtl.circle(400) trtl.penup() trtl.setpos(-370,100) trtl.pendown() trtl.pencolor('green') trtl.write('Happy friendship day',font=("Arial", 14,"normal")) trtl.color("red") trtl.begin_fill() trtl.penup() trtl.setpos(-70,200) trtl.pensize(5) trtl.left(50) trtl.forward(133) trtl.circle(50,200) trtl.right(140) trtl.circle(50,200) trtl.forward(133) trtl.end_fill() trtl.hideturtle() turtle.done()

Draw Virat Kohli's Cartoon face using python turtle graphics

Image
 In this Article I'll share the Source Code to draw Virat kohli's Cartoon face using python turtle graphics.  Source Code:- from turtle import * vk=Turtle() s=Screen() s.bgcolor("NavajoWhite2") vk.speed(1) vk.penup() vk.setposition(0,-200) vk.pendown() vk.begin_fill() vk.color('black') vk.right(75) vk.circle(100,90) vk.right(13) vk.forward(180) vk.circle(100,90) vk.forward(80) vk.right(-200) vk.circle(40,-90) vk.circle(80,-26) vk.right(90) vk.forward(140) vk.circle(50,90) vk.right(80) vk.circle(200,30) vk.right(120) vk.circle(1000,-26) vk.right(85) vk.circle(110,95) vk.right(-140) vk.backward(30) vk.right(60) vk.backward(50) vk.speed(1) vk.right(20) vk.forward(63) vk.right(120) vk.speed(1) vk.circle(50,45) vk.right(-30) vk.forward(240) vk.right(95) vk.circle(300,34) vk.right(40) vk.forward(50) vk.left(10) vk.forward(80) vk.right(90) vk.forward(150) vk.right(95) vk.backward(60) vk.right(-30) vk.forward(50) vk.speed(1) vk.right(-30) vk.forward(100) vk.right(80) ...

Draw a Carromboard using python turtle graphics

Image
In this Article I'll share the source Code to draw A carromboard using Python turtle graphics. I hope that you will like it and share with those who need it.  Source Code :- def squares(x,y,f,p,c):  t.speed(0)  t.up()  t.goto(x,y)  t.down()  t.begin_fill()  t.pensize(p)  t.pencolor(c)  t.fillcolor(c)  for i in range(4):   t.forward(f)   t.left(90)  t.end_fill() def outline(x,y,f,p,c):  t.speed(0)  t.up()  t.goto(x,y)  t.down()  t.pensize(p)  t.pencolor(c)  for i in range(4):   t.forward(f)   t.left(90) def circlefill(x,y,r,c):   t.speed(0)   t.up()   t.goto(x,y)   t.down()   t.begin_fill()   t.fillcolor(c)   t.circle(r)   t.end_fill()   def circlefillout(x,y,r,c):   t.speed(0)   t.up()   t.goto(x,y)   t.down()   t.pencolor(c)   t.begin_fill()   t.fillcolor(c)   t.circle(r)   t.end_fill...

Draw 3d shape with python turtle

Image
 In this article I'll share the source code to draw this beautiful 3d image using python turtle graphics.  Source code :- import turtle as t pen = t.Turtle() pen.color('cyan') pen.speed(0) screen=t.Screen() screen.bgcolor('black') def draw_square():     for side in range(4):         pen.forward(100)         pen.right(90)         for side in range(4):             pen.forward(50)             pen.right(90) pen.penup() pen.back(20) pen.pendown() for square in range(80):     draw_square()     pen.forward(5)     pen.left(5) Output :- Share your thoughts in comment box below. 

Draw Circle spirograph using turtle graphics

Image
 The best advantage of turtle graphics in python is you can be creativity as much as you want. You can make a lot of creative designs and arts using it. In this article I'll share the source code to draw a beautiful Circle spirograph in your Mobile phone.    Source Code:-  import turtle turtle.bgcolor("black") turtle.pensize(2) turtle.speed(0) for i in range(25):     for colours in ("red", "magenta", "blue", "cyan", "green", "yellow", "white"):         turtle.color(colours)         turtle.circle(100)         turtle.left(10)         turtle.hideturtle() turtle.penup()  turtle.setposition(-200, -300)  turtle.pendown()  turtle.write(" follow@only.python")  turtle.done()  Output :- If you like this article share it with your friends and follow me on Instagram @only.python.

Drawing Pikachu using Python turtle graphics.

Image
  Hey guys welcome once again to the blog page of @only.python. In this article I'll share the source code and video of Drawing Pikachu (a famous cartoon character) using Python turtle graphics.  Source code:-   import turtle def getPosition(x, y):         turtle.setx(x)         turtle.sety(y)         print(x, y) class Pikachu:     def __init__(self):         self.t = turtle.Turtle()         t = self.t         t.pensize(3)         t.speed(9)         t.ondrag(getPosition)                   def noTrace_goto(self, x, y):         self.t.penup()         self.t.goto(x, y)         self.t.pendown()     def leftEye(self, x, y):         self.noTrace_goto(x, y)     ...