i need to write a program that uses nested loops to draw a certain number of asterisks that decrease by 1 per iteration
so it should print something similar to this, but the starting number of asterisks shouldn't be hardcoded. even if you put in 12 instead of 7, it should still be able to work.
*******
******
*****
****
***
**
*
right now i have this:
code:
x = ["*", "*", "*", "*"]
print(x)
for i in x[:]:
if i == "*":
x.remove(i)
print(x)
output:
['*', '*', '*', '*']
['*', '*', '*']
['*', '*']
['*']
[]