I need to make a pattern with a function, which given an integer(n) will print out a particular pattern of size n. It should look like this at size 4, for example:
!!!!!!!!!!!!!!
\\!!!!!!!!!!//
\\\\!!!!!!////
\\\\\\!!//////
Here is my code thus far. I don't know how to invert the pyramid shape, and I don't know how to get the slashes to work with the exclamation points to create the desired pattern as you can see:
def slashFigure():
width = int(input("Enter a number: "))
for i in range(0, width):
for j in range(0, width - i):
print("\\", end="")
for k in range (0, 2*i + 1):
print("!!", end="")
print("/")
slashFigure()