+ 27
[ASSIGNMENT] Triangles Forming a Square
Form a square by spliting it diagonally an into 4 triangles (top, left, bottom, & right) and filling each in with numbers. The triangles should be filled out in the order listed above. Numbers on the diagonals belong to the first triangle to be filled in. Within a triangle, start at the top leftmost point, go as far right on the row as needed, before starting the next row as far to the left as possible. Column spacing must be maintained for the entire square. You must handle 3x3 to 9x9 squares
12 Answers
+ 16
tricky
+ 6
@john fixed/unfixed (-;
+ 5
@Oma, nice. However, your fixed size doesn't follow my request to support 3 to 9 based on user input or random number.
+ 5
As I didn't know Python completely
,my code will not have such a great function or.......
So I code this challenge with the best of my coding...
Run this!!!?!!
https://code.sololearn.com/cY13XC3qsGUQ/?ref=app
+ 4
Now my code should work correctly for all sides:
https://code.sololearn.com/cyQRu2uBeqmH/?ref=app
+ 4
My latest lesson has been submitted. This code has the rules and solves it.
https://code.sololearn.com/c0g34cgteZjA
+ 3
My latest assignment lesson code.
https://code.sololearn.com/cZV21DN7y959
+ 3
For a up to date list of all my assignments/challenges see:
https://code.sololearn.com/WwCPr427zPjD
+ 2
Challenge #2
https://www.sololearn.com/Discuss/1095936
+ 2
Since they don't want me posting challenges and who knows if lessons will ever get approved, I'm posting my other submitted lessons here. Please comment on my program for any you choose to try.
https://code.sololearn.com/cajCn2Rz8cRa
https://code.sololearn.com/chTd069rcE9H
https://code.sololearn.com/cOUl0TPezP8M
https://code.sololearn.com/cTno1cs3lzAA