Skip to main content

Python Logo by Python Turtle Graphics | Simple Python Project | Simple Python Turtle Programming

Python Logo by Python Turtle Graphics | Simple Python Project | Vast Coding 

Here is the Source Code:- 


import turtle


t = turtle.Turtle()

s = turtle.Screen()

s.bgcolor("black")

t.speed(0)

t.pensize(2)

t.pencolor("white")


def s_curve():

    for i in range(90):

        t.left(1)

        t.forward(1)

def r_curve():

    for i in range(90):

        t.right(1)

        t.forward(1)

def l_curve():

    s_curve()

    t.forward(80)

    s_curve()

def l_curve1():

    s_curve()

    t.forward(90)

    s_curve()

def half():

    t.forward(50)

    s_curve()

    t.forward(90)

    l_curve()

    t.forward(40)

    t.left(90)

    t.forward(80)

    t.right(90)

    t.forward(10) 

    t.right(90)

    t.forward(120) #on test

    l_curve1()

    t.forward(30)

    t.left(90)

    t.forward(50)

    r_curve()

    t.forward(40)

    t.end_fill()

def get_pos():

    t.penup()

    t.forward(20)

    t.right(90)

    t.forward(10)

    t.right(90)

    t.pendown()

def eye():

    t.penup()

    t.right(90)

    t.forward(160)

    t.left(90)

    t.forward(70)

    t.pencolor("black")

    t.dot(35)

def sec_dot():

    t.left(90)

    t.penup()

    t.forward(310)

    t.left(90)

    t.forward(120)

    t.pendown()

    t.dot(35)


t.fillcolor("#306998")

t.begin_fill()

half()

t.end_fill()

get_pos()

t.fillcolor("#FFD43B")

t.begin_fill()

half()

t.end_fill()


eye()

sec_dot()


def pause():

    t.speed(2)

    for i in range(100):

        t.left(90)

pause()


Output:-


NOTE:- Please help me to grow my Youtube Channel called "Vast Coding"





Comments

  1. This Code is not working 😟😟😟

    ReplyDelete
    Replies
    1. I have rechecked the code,it is correct and working fine.

      Delete

Post a Comment

Popular posts from this blog

Draw anyone's Sketch using Python Turtle Graphics in Python Programming

Draw anyone's Sketch using Python Turtle Graphics in Python Programming 👨‍💻🔥 In this post ,I will tell you about How to make Anyone's Sketch in Python using svg file and using these libraries: Turtle,cv2(opencv-python),svgpathtools,svg.path and tqdm. You can install these libraries using pip command. Turtle is pre-installed in mostly all programming softwares. And here are the pip commands to install other libraries : pip install opencv-python pip install svgpathtools pip install svg.path pip install tqdm 𝗦𝘁𝗲𝗽𝘀 𝘁𝗼 𝗺𝗮𝗸𝗲 𝘀𝗸𝗲𝘁𝗰𝗵 :  1)Go to https://svgconvert.com/#/  2)Upload the image and change the threshold value according to the image and download it as a svg file.  3)Save the code and svg file in the same folder.  Source Code : import turtle as tu import cv2 from svgpathtools import svg2paths2 from svg.path import parse_path from tqdm import tqdm class sketch_from_svg: def __init__(self,path,scale=30,x_offset=400,y_offset=400): s...

Netflix Logo using Python Turtle Programming | Simple Python Project | Vast Coding

Netflix Logo using Python Turtle Programming | Simple Python Project | Vast Coding   Here is the Source Code :- import turtle t = turtle.Turtle() t.speed(10) turtle.bgcolor("white") t.color("white") t.up() t.goto(-80,50) t.down() t.fillcolor("black") t.begin_fill() t.forward(200) t.setheading(270) s = 360 for i in range(9): s = s - 10 t.setheading(s) t.forward(10) t.forward(180) s = 270 for i in range(9): s = s - 10 t.setheading(s) t.forward(10) t.forward(200) s = 180 for i in range(9): s = s - 10 t.setheading(s) t.forward(10) t.forward(180) s = 90 for i in range(9): s = s - 10 t.setheading(s) t.forward(10) t.forward(30) t.end_fill() t.up() t.color("black") t.setheading(270) t.forward(240) t.setheading(0) t.down() t.color("red") t.fillcolor("#E50914") t.begin_fill() t.forward(30) t.setheading(90) t.forward(180) t.setheading(180) t.forward(30) t.setheading(270) t.for...

Flappy Bird Game using Python 🔥🔥 Python in Pydroid3 | Amazing Python Project | Vast Coding

Flappy Bird Game using Python 🔥🔥 Python in Pydroid3 | Amazing Python Project | Vast Coding                                    Here is the Source Code:- main.py import pygame import random from objects import Grumpy, Pipe, Base, Score # Setup ******************************************* pygame.init() SCREEN = WIDTH, HEIGHT = 288, 512 display_height = 0.80 * HEIGHT info = pygame.display.Info() width = info.current_w height = info.current_h if width >= height: win = pygame.display.set_mode(SCREEN, pygame.NOFRAME) else: win = pygame.display.set_mode(SCREEN, pygame.NOFRAME | pygame.SCALED | pygame.FULLSCREEN) # win = pygame.display.set_mode(SCREEN, pygame.SCALED | pygame.FULLSCREEN) clock = pygame.time.Clock() FPS = 60 # COLORS RED = (255, 0, 0) WHITE = (255, 255, 255) BLACK = (0, 0, 0) # Backgrounds bg1 = pygame.image.load('Assets/background-day.png') bg2 = pygame.image.load('Assets/b...