Page 1 of 1

For this lab, we will be writing a Python script (.py) that will print out some ascii art using nested while loops. Each

Posted: Tue Jul 12, 2022 8:21 am
by answerhappygod
For This Lab We Will Be Writing A Python Script Py That Will Print Out Some Ascii Art Using Nested While Loops Each 1
For This Lab We Will Be Writing A Python Script Py That Will Print Out Some Ascii Art Using Nested While Loops Each 1 (56.32 KiB) Viewed 32 times
For this lab, we will be writing a Python script (.py) that will print out some ascii art using nested while loops. Each task below should be separated using comments (i.e. # problem 1, # problem 2, etc.). No for loops or custom functions are allowed, only while loops. You can make use of the end parameter for the print function to remove the new line character it prints (ex: 1. Using nested while loops, write a code snippet that prints an equal lateral triangle with the base on the bottom. You should accept what character the user wants to print as part of the ascii art as well as the max number of these characters to print at the triangle's max width. The characters should be padded with a space. 2. Add another nested while loop after your solution to #1 to print another equilateral triangle, but flipped so that the base is at the top in order to make a triangle. The base of this triangle should be one less than the max width. 3. Reduce the solution to #2 to be only a single outer while loop. You may still have nested while loops inside.