Created
September 2, 2022 21:50
-
-
Save s1monw1/a61bc53e012360b137b014c40b3ac1d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Turtle { | |
fun penDown() | |
fun penUp() | |
fun turn(degrees: Double) | |
fun forward(pixels: Double) | |
} | |
with(Turtle()) { | |
penDown() | |
for(i in 1..4) { | |
forward(100.0) | |
turn(90.0) | |
} | |
penUp() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment