-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmobil_logo.py
More file actions
39 lines (28 loc) · 713 Bytes
/
Copy pathmobil_logo.py
File metadata and controls
39 lines (28 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
@Author: DAShaikh
Logo: Mobil (https://www.mobil.com)
"""
import turtle
def draw_string(pen, pcolor, x, y, text):
"""
Draw the input string.
Configurable methods: `color`, `goto`.
"""
# Set properties and initial position.
pen.color(pcolor)
pen.penup()
pen.goto(x, y)
pen.pendown()
# Write text.
pen.write(text, font=("Arial", 90, "bold"))
# Initialize the turtle pen and screen objects.
pen = turtle.Turtle()
screen = turtle.Screen()
# Hide pen.
pen.hideturtle()
# Write "Mobil".
draw_string(pen, "#0066b3", -150, -70, "M")
draw_string(pen, "#ed1b2f", -50, -70, "o")
draw_string(pen, "#0066b3", 20, -70, "bil")
# Hold screen.
screen.exitonclick()