How would one use turtle to draw a staricase?
How would I write a function that asks the user for three inputs: an integer representing the height of a step, width of a step, and the number of steps. Use turtle graphics to draw a staircase with the entered parameters. Join the top and the bottom with a vertical and a horizontal line.
Posted Oct 27, 2016, 3:41 PM UTC
23
Have you tried anything yet? Or thought more or less how would you proceed?
yea just confused how to make the turtle draw upwards not only forwards and how to make the seperate steps them selves. i get i use three arguments and that stuff
You can check in the module's official page, when your turtle is facing a certain direction you can rotate it with the .right(angle) and .left(angle); where angle is, in degrees, how much you want it to rotate.
Think, from the direction it's facing, where would 'upwards' be, rotate, move, repeat!