Question: def draw_x (height): ------------------------------------------------------- Prints a X shape height characters high. Use: draw_x(height) ------------------------------------------------------- Parameters: height - maximum height in characters of X shape
def draw_x(height):
"""
-------------------------------------------------------
Prints a X shape height characters high.
Use: draw_x(height)
-------------------------------------------------------
Parameters:
height - maximum height in characters of X shape (int >= 3)
Returns:
None
-------------------------------------------------------
"""
# Your code here
return
Complete the function draw_x in the t04_functions.py module. The module t04.py provides simple testing for this function.
Given a positive integer parameter, this function prints an X using the # character where the height of the X is height characters. The widest width of the X is equal to the height. Some examples from executing t04.py:
draw_x(5) -> # # # # # # # # # draw_x(6) -> # # # # ## ## # # # # draw_x(7) -> # # # # # # # # # # # # #
Requirements
This function must:
- use
forloops - Hint: lines must not end with spaces
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
