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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 30 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply