DRAW with python turtle!
I managed to program a basic drawing app using only the python turtle module! It was pretty fun to code. I attached some drawings I made ^-^
EDIT: WOW I'M IN THE NEWSLETTER!? I'm honoured! (https://replit-newsletter-16--timmy-i-chen.repl.co/?ref=newsletter)
I'm working on a couple games, so watch out! (Although they probably won't be done soon, because it's GCSE year, ugh...)
This file cannot be displayed: https://storage.googleapis.com/replit/images/1536865435321_bd598138637586247b2433a96371534d.pn
This file cannot be displayed: https://storage.googleapis.com/replit/images/1536865448102_a542f76811f1df3d35a97ffd613c3e39.pn
@The_Emira Thanks so much! And you can change the colours by pressing X. There are instructions in the console. You need to put it into a weird box thing because for some reason the input module doesn't work, it refreshes the screen before the colour is saved for some reason :/
This code was pretty cool. I would like to understand how you did your code. I am pretty recent into coding with Java
t = turtle.Turtle()
y = turtle.Turtle()
tsize = 10
screen = turtle.Screen()
tcolour = (0,0,0)
colour = input("Input colour string (DON'T TYPE IT HERE!) \n")
tcolour = (int(colour[0:3]), int(colour[3:6]), int(colour[6:9]))
tsize = t.pensize() + 2
tsize = t.pensize() - 2
tcolour = (0,0,0)
tcolour = (0,255,200)
tcolour = (255,255,255)
print("""Hey you! You're obviously really bored, since you're running my slightly trashy, slightly unfinished drawing program. (It's probably a rival to MS Paint though.)
Here are the controls:
Click to move the pen, click and drag to draw. Yes, click twice. Deal with it.
The left and right arrows decrease and increase pen size, respectively.
Space clears the canvas.
Pressing X lets you change the pen colour by inputting a colour string.
Quick colour shortcuts: 1-Black, 2-Jade, 3-White (eraser).
I have no idea how to program a 'save' so just screenshot the result.
A NOTE ON COLOUR STRINGS:
First, input them CORRECTLY. RRRGGGBBB, no spaces, no letters, no values over 255. I didn't bother babyproofing this, as common sense exists.
Second, DON'T TYPE THEM IN HERE. The enter key causes the program to refresh, clearing the input in the process. See that little arrow/box icon in the corner? Click it and type the colour string there instead, then hit the enter button. (Ignore the error message, the color would have changed on the 'result'.) I don't know why, but it works.""")
Please let me know if you catch any bugs! I know you almost always have to click the pen twice to draw, this was inevitable since otherwise the pen won't move from place to place :O