X
XXX
XXXXX
XXXXXXX
This is one part of the introductory assignment in my computer science course. The teacher has taught us ranges with regards to i and j. I have absolutely no idea how to achieve the pyramid, and I've been trying different things for hours. Aside from the two 50 minute classes I've had, i have never been exposed to any sort of programming. I would greatly appreciate some help / advice.
this code is the extent of our current instruction and supposed knowledge:
for i in range(10):
line = ""
for j in range(10):
if j%2 == 0:
c = ' '
else:
c = '*'
line += c
print line