Explore

Close
Turtle Programs Share

Draw Pubg Logo Using Python With Code

Draw Pubg Logo Using Python With Code

Want to know how to draw Pubg logo using python, then you are at the right place. Today in this tutorial I will show you how to draw the Pubg logo using python turtle with code, so follow this tutorial till the end.

Pubg is one of the most popular game, It is a multiplayer online battleground game so today I have decided to create a tutorial on drawing its logo using python.

We will use the turtle module to draw the Pubg logo in python. Turtle is a GUI library with the help of this library you can draw anything in python. 

Don’t worry if you don’t know about this library. I will show you everything on how to create this program and provide you with the code.

PUBG Logo Python Code


import turtle

t = turtle.Turtle()

turtle.bgcolor("black")
t.color("white")

def rect():
    t.pensize(9)
    t.forward(170)
    t.left(45)
    t.forward(6)
    t.left(45)
    t.forward(170)
    t.left(45)
    t.forward(6)
    t.left(45)
    t.forward(330)
    t.left(45)
    t.forward(6)
    t.left(45)
    t.forward(170)
    t.left(45)
    t.forward(6)
    t.left(45)
    t.forward(170)

def four_corner_lines():
    t.pensize(12)
    t.penup()
    t.forward(180)
    t.left(90)
    t.forward(35)
    t.left(90)
    t.pendown()
    t.forward(12)
    t.penup()
    t.forward(344)
    t.pendown()
    t.forward(17)
    t.penup()
    t.right(90)
    t.forward(105)
    t.right(90)
    t.pendown()
    t.forward(17)
    t.penup()
    t.forward(344)
    t.pendown()
    t.forward(12)

def p():
    t.penup()
    t.left(180)
    t.forward(280)
    t.pendown()
    t.forward(40)
    t.left(90)
    t.forward(100)
    t.left(180)
    t.forward(52)
    t.right(90)
    t.forward(40)
    t.left(90)
    t.forward(47)

def u():
    t.penup()
    t.right(90)
    t.forward(32)
    t.right(90)
    t.pendown()
    t.forward(98)
    t.left(90)
    t.forward(40)
    t.left(90)
    t.forward(98)

def b():
    t.penup()
    t.right(90)
    t.forward(35)
    t.pendown()
    t.forward(45)
    t.right(90)
    t.forward(43)
    t.right(45)
    t.forward(5)
    t.right(45)
    t.forward(40)
    t.left(90)
    t.forward(5)
    t.left(90)
    t.forward(40)
    t.right(45)
    t.forward(5)
    t.right(45)
    t.forward(40)
    t.right(90)
    t.forward(45)
    t.right(90)
    t.forward(96)

def g():
    t.penup()
    t.right(180)
    t.forward(53)
    t.left(90)
    t.forward(98)
    t.pendown()
    t.forward(25)
    t.right(90)
    t.forward(45)
    t.right(90)
    t.forward(45)
    t.right(90)
    t.forward(95)
    t.right(90)
    t.forward(40)    

rect()
four_corner_lines()
p()
u()
b()
g()

turtle.done()

Above is the python code to draw the Pubg logo. Now to run this program you need to have python installed on your computer, If you don’t have then follow this guide: Install and setup python on your computer.

To run this python program, follow the below steps:

  • Create a new folder for this python project.
  • Open it in a code editor of your choice.
  • Create a python file with an ending .py extension.
  • Copy the above code and paste it in your file.

Now you have the code, but there is one last thing you need to do as I have said I have used the turtle library for this program so you might need to install it if you get any errors like turtle module not found.

Turtle comes pre-installed with python setup, but if you get any errors you can install it using the below command.


pip install turtle

So now you have everything setup and you are ready to run the program, so to run this program open a command prompt at your program folder location and paste the below command.


python filename.py

The above command will run the program and it will open a new window and it will start drawing the Pubg Logo and below is the finished drawing of the logo.

Pubg Logo Drawing

As you can see, we successfully drew the Pubg logo using python turtle. I hope you were able to run this program successfully. 

Want more amazing turtle tutorials like this check out this: Awesome Python Turtle Codes.

Don’t want to create all the files and folders then you can run this program now using this online python compiler it is fast and easy.

Summary

This was the tutorial on drawing the Pubg logo using python turtle. I hope you found this tutorial helpful and useful. Do share this tutorial with your friends who might be interested in this program.

Here are some more python drawing tutorials for you:

I hope you found what you were looking for from this tutorial, and if you want more python guides and tutorials like this, do join our Telegram channel for future updates.

Thanks for reading, have a nice day 🙂