For golfing practice, I have been doing the assignments in my girlfriend's Intro to Python class. I found that for this assignment, there were multiple strategies that came very close in character count, and I'm sure people here can find even better ways. Although I am most interested in ways to do this in Python, I would like to know the most golfed this program can get, therefore this is code golf and shortest answer wins.
The assignment is outlined below. The user should be asked to input twice, although the prompts don't have to say anything, and can be in a different order.
Standard loopholes apply.
Assignment 3: Arrows
Write a program that prompts the user for a number of columns, and them prints the pattern as seen below. You can assume that the user will supply positive numbers. Your program should handle both left and right arrows. Here are a few sample runnings:
How many columns? 3 Direction? (l)eft or (r)ight: r * * * * * How many columns? 5 Direction? (l)eft or (r)ight: l * * * * * * * * *