• Home
  • Tutorials
    • Python
    • Machine Learning
    • Pygame
    • Python Quiz
  • 100+ Projects
    • 100+ Python Projects
    • 100+ Java Projects
  • PYTHON HANDWRITTEN NOTES
    • Python Short Notes
    • Complete DSA Notes
    • Python Detailed Notes
  • Python Compiler
    • All Editors
    • Turtle Compiler
    • Online Java Compiler
    • Online C++ Compiler
    • Online C Compiler
  • Contact Us
    • About Us
    • Policy
  • Our Android Apps
    • Unlimited Python Exercises App
    • Complete Linux Commands App

CopyAssignment

We are Python language experts, a community to solve Python problems, we are a 1.2 Million community on Instagram, now here to help with our blogs.

×

Draw PUBG Logo Using Python Turtle

 Vatsal Rakholiya  May 17, 2022
Draw PUBG Logo Using Python Turtle

Introduction

You’ve come to the right place if you want to learn how to draw the PUBG Logo Using Python Turtle. PUBG is one of the most popular games. It is a multiplayer online warfare game, thus I decided to do a lesson on making its logo in Python today.

Table Of Contents
  1. Introduction
  2. Creating a PUBG Logo :
    • Step 1. Import turtle library
    • Step 2. Creating a turtle object. And set up the background color using bgcolor() Function
    • Step 3. Creating a Rectangle to fit the logo in it
    • Step 4. Creating a Function called four_corner_lines()
    • Step 5. PUBG word in the rectangle. Starts with the P
    • Step 6. Drawing the letter U
    • Step 7. Drawing the Letter B
    • Step 8. Drawing the letter G
    • Step 9. Now we are calling all the functions to complete the logo.
  3. Source Code to Draw the PUBG Logo using Python Turtle
  4. Output

Creating a PUBG Logo :

Step 1. Import turtle library

import turtle

Step 2. Creating a turtle object. And set up the background color using bgcolor() Function

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

Step 3. Creating a Rectangle to fit the logo in it

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)

We create a function called react() to create a rectangle shape.

Step 4. Creating a Function called four_corner_lines()

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)

This function will create 4 lines outside the rectangle. 2 on the left and 2 on the right.

Step 5. PUBG word in the rectangle. Starts with the P

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)

Step 6. Drawing the letter U

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)

Step 7. Drawing the Letter B

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)

Step 8. Drawing the letter G

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)

Step 9. Now we are calling all the functions to complete the logo.

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

Source Code to Draw the PUBG Logo using Python Turtle

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()

Output

output to draw PUBG Logo Using Python Turtle
Output

As you can see, we were able to correctly draw the PUBG logo with Python Turtle. I hope you were successful in running this software. If you’re looking for more fantastic turtle lessons, check out this: Amazing Python Turtle Codes.


Also Read:

  • Top 25 Pattern Programs in C++
  • Currency Converter in C++
  • SQLite | CRUD Operations in Python
  • Number Guessing Game in C++
  • Image background remover in Python
  • C++ Project Structure
  • Python | Check if a string is a palindrome or not without Recursion
  • Python | Check if a number is an Armstrong Number or not using Recursion
  • Python | Check if a number is an Armstrong Number or not without using Recursion
  • Python | Shuffle a list using recursion
  • Python | Shuffle a list without recursion
  • Python | Implementing switch case using functions
  • Python function to check whether a number is perfect or not
  • Python | Find LCM using function
  • Python | Find HCF using function
  • Python | Convert the binary number to decimal without using library function
  • Python | Create a basic operations calculator(+, -, /, and x), create a separate function for each operation
  • Python | Detecting the number of local variables declared in a function
  • Python | Making a chain of function decorators (bold italic underline etc)
  • Python | Access function inside a function
  • Event Management System Project in Python
  • ATM machine program in C++
  • Python | Create a function with a pass statement
  • Python | Function to calculate the square root of a number
  • Python | A function that calculates the power of a number
  • Python | A function that accepts 2 integers and adds them and returns their sum
  • Python | Function that takes a list of integers and returns the last integer
  • Python | Return multiple values from a function
  • Python function that takes a list and returns a new list with unique elements of the first list
  • Python | Generate a random number in the range of 1 to 10 using the function
Share:
Avatar of Vatsal Rakholiya

Author: Vatsal Rakholiya

Post navigation

← Draw Snowflakes using Python Turtle
Draw WhatsApp Logo Using Python Turtle →

Categories

30 Days of Code allcategorites assignment c and cpp competitive programming data structures and algorithms django tutorial final year project game in python general-python gfg github-copy gui java project gui python projects how-to html css javascript project java java game projects java projects job leetcode Machine Learning ml-shorts ml ai ds project php projects programs in python project ideas pygame tutorial python-error python-short-tutorial python projects python simple programs python sqlite qna python turtle python very small program assignments tutorial web projects

Search….

SiteMap

Python

Machine Learning

Pygame

Data Structures and Algorithms(Python)

Python Turtle

Games with Python

All Blogs On-Site

Python Compiler(Interpreter)

Online Java Editor

Online C++ Editor

Online C Editor

All Editors

Services(Freelancing)

Recent Posts

  • Top 25 Pattern Programs in C++
  • Currency Converter in C++
  • SQLite | CRUD Operations in Python
  • Number Guessing Game in C++
  • Image background remover in Python

Must Read

  • 100+ Python Projects
  • 100+ Java Projects
  • Python Programs
  • JavaScript Projects
  • Java Projects
  • PHP Projects

RoadMap to Learn

  • Python
  • Java
  • JavaScript

Python Handwritten Notes

Click Here to buy now

Python Assignment Help

We also deal with Python Assignments, Homeworks, and Projects. Click Here, to get your Python work done by experts.

close button

© Copyright 2022 www.copyassignment.com. All rights reserved. Developed by copyassignment