Create a function del fractglength, spaces). This function will print out a certain number of stars* and
Question:
Create a function del fractglength, spaces). This function will print out a certain number of stars* and spaces.
• If length is 1 print out the number of spaces given followed by 1 star.
• If the length is greater than one do the following:
o Print the fractal pattern with half the length and the same number of spaces.
o Print the number of spaces given followed by length stars.
o Print the fractal pattern with half the length and spaces + (length//2) spaces in front of it.
Once your function works, prompt the user for an integer x and execute fractal(x.0). You will not receive credit if your function is not recursive.
If the input is not an integer' 0, ask again. Your program should exit after successfully drawing a Fractal.
Probability and Random Processes With Applications to Signal Processing and Communications
ISBN: 978-0123869814
2nd edition
Authors: Scott Miller, Donald Childers