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

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.

Step by Step Solution

3.52 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The question is mostly complete but has a few errors likely due to misinterpretation during transcri... View full answer

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 Programming Questions!