Text Size
Text Size
Exit Full Screen
Python Mini
Show
Source Code
View Source Code in Full Screen
Open in New Tab
from processing import * width = 550 height = 490 cursor = { 'x': 225, 'y': 245, 'width': 20, 'height': 20, } curr_color = [0, 0, 0] def setup(): size(width, height) background(255) def draw (): fill(0) rect(cursor['x'], cursor['y'], cursor['width'], cursor['height']) def keyPressed(): if keyboard.keyCode == UP: cursor['y'] -= 5 elif keyboard.keyCode == DOWN: cursor['y'] += 5 if keyboard.keyCode == LEFT: cursor['x'] -= 5 elif keyboard.keyCode == RIGHT: cursor['x'] += 5 run()
ech_sckch.py
( around 26 lines python code )
Published By:
th1836
Published on
2017-07-28T14:03:12Z
Python Mini
- an
OYOclass
application,
own your own class today
.
Run
Result
×
Error message shows here