Sep-29-2018, 03:10 AM
(This post was last modified: Sep-29-2018, 03:23 AM by ichabod801.)
Hello! I'm a beginner at Python and the course was going smoothly at first for me, but now recursive/loop structure have come into play and it's been confusing me.
For one of my assignments, I need to create this triangle:

**edit: the triangles are suppose to be in a pyramid shape and not in the staircase shape. I tried to space it out but it didn't seem to work!
For one of my assignments, I need to create this triangle:
Output: *
* * *
* * * * *
So here's the closest thing I've been able to get:j=9 for i in range (1,10,2): if i % 3 or 5: print (' '* j+i * '*') j=j-1which got me
Output: *
***
*****
*******
*********
and it looks hardly anything close to what I should be getting. How do I omit certain rows and insert spaces between the asterisks? 
**edit: the triangles are suppose to be in a pyramid shape and not in the staircase shape. I tried to space it out but it didn't seem to work!