Question: IN PYTHON Write a program named Stairs.py that prompts the user for a number of steps between 1 and 10 and then draws the steps

IN PYTHON

Write a program named

Stairs.py

that prompts the user for a number of steps between

1 and 10 and then draws the steps as shown below

How many steps(1-10)? 1

IN PYTHON Write a program named Stairs.py that prompts the user for

How many steps(1-10)? 4

a number of steps between 1 and 10 and then draws the

You may assume that a minimum of 1 step and a maximum of 10 steps will be entered. You do not

need to do any error checking of the user input for this program. If the user enters something other than an integer, the program will "throw an exception." This behavior is fine for this program.

Design You must define at least two functions in your program. One of your methods must take at least one parameter. You must use at least one loop within the program as well.

Implementation

Be sure to define any necessary constant(s) rather than use magic numbers.

HINT: Use a for loop to output the correct number of spaces before each step other than the first

step. You may want to define a method

that outputs a given number of spaces.

0 2 2 2 0 2 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!