Ask coding questions

← Back to all posts
Help on Python Turtle
HarveyH (97)

Can you convert this code so that it'll work on repl.it please?

wn.onkeypress(circle, "o")

The variables are all defined.

Answered by Geocube101 (294) [earned 5 cycles]
View Answer
Commentshotnewtop
Geocube101 (294)

wn.onkey(circle, "o")
sw.listen()
The 'listen()' function must be added to listen for key press

HarveyH (97)

@Geocube101 Thx! (and by the way, I already knew listen)

HarveyH (97)

Thank you guys for helping me port this to repl.it! Here is the drawing tool https://repl.it/@HarveyH/Drawing-Tool

HappyFakeboulde (213)

have you already tried putting it directly on repl.it (with all the previous code in the program)?

HarveyH (97)

For anyone asking, this is a bit of code from a project (A drawing Programme is what I'm working on) in PyCharm that I am trying to port to repl.it. If you can't port this bit of code, then I'll just have to send you a link to my code.