event-listener

Calling same function by different objects by pressing different key in python

Calling same function by different objects by pressing different key in python Question: I have created two turtles say ‘tur1’ and ‘tur2’ in python using turtle module. I have created event listener on the screen. I have created a function ‘move_fwd(turte_name)’ which moves the turtle forward by 20 steps. I want that if key ‘w’ …

Total answers: 4