Quote:
Confused on how to print
Indeed, and I don't see how you can get correct print from the
lists
you built.
Look at output :
/\
/ \
/\ / \ /\
/ \ / \ / \
/ \ / \ / \
\/ \ /
\/
The output fits in a rectangle :
- so first you need to compute number of rows and columns.
- then the position of each lines (rows and columns).
Then you have 3 approaches:
- you have a 2D terminal with cursor positioning : you draw lines directly.
- you built a list of strings and built the strings as you draw the lines in strings, then print each resulting strings.
- you print directly each row as you build them on fly.
First choose a method you are comfortable with.
Built a toy program that draw only the first line.
Then extend the toy program to draw the first 2 lines.
then extend for all lines.
There is no fiw for your code because you are nowhere near a solution.