Dot-to-Dot TextEdit in new window bubble
xxxxxxxxxx
#Python Turtle - WordArt Challenge - www.101computing.net/python-turtle-wordart-challenge/
import turtle
import random
from alphabet import alphabet
myPen = turtle.Turtle()
myPen.hideturtle()
myPen.speed(0)
window = turtle.Screen()
window.bgcolor("#000000")
myPen.pensize(2)
def displayMessage(message,fontSize,color,x,y):
myPen.color(color)
message=message.upper()
for character in message:
if character in alphabet:
letter=alphabet[character]
myPen.penup()
for dot in letter:
myPen.goto(x + dot[0]*fontSize, y + dot[1]*fontSize)
myPen.pendown()
x += fontSize
if character == " ":
x += fontSize
x += characterSpacing
#Main Program Starts Here
fontSize = 30
characterSpacing = 5
fontColor = "#FF00FF"
message = "Hello world!"
displayMessage(message,fontSize,fontColor,-190,0)
task_alt