+ 1
Why isn’t my * triangle code acceptable?
It looks to me like I’ve solved the practice q but it’s not an acceptable answer, so I’m stuck. Please could someone give me a steer? https://code.sololearn.com/cTZqbc3Xs46x/?ref=app
7 ответов
+ 3
You should only remove all the spaces.
And i have a newline after the last four stars, i don't know if it will make a difference.
+ 1
Paul, thank you - that worked. I had envisioned a different alignment for the triangle. Making it more complicated than it needed to be!
0
You should use a loop to print the stars as a shape triangle, I think.
Happy coding!
0
I’m only on Lesson 8.1 and haven’t been introduced to loops yet, so I wonder if there’s another reason?
0
print(" *\n * *\n * * *\n* * * *")
Try this!
0
Sarah von Blumenthal
I see, no problem. Just try to print all lines one by one.
print("*")
print("**")
...
Happy coding!
0
Thanks Vadivelan. I’m afraid it didn’t work.
mesarthim I’ll try that, but the activity tip talked about using spaces and \n