Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

staircase coding advice

$
0
0
Write a function named steps() that draws a staircase. Each step of the staircase consists of a vertical line and a
horizontal line of the same length. The function steps() takes three parameters:
1. a turtle
2. an integer, stepSize, that is the height and depth of a step
3. an integer, numSteps, that is the number of steps to draw
For example, if the function steps() is called by the following code, the drawing below would be
correct output:
from turtle import *
turt = Turtle()
steps(turt, 50, 3)

i am new to python but i just need help understanding a parameter. a small example would be very helpful to understand how to do this problem.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>