Question: Could you answer these using python? For Loops 1. Write a function that takes a number n as its sole argument and then prints out
Could you answer these using python?


For Loops 1. Write a function that takes a number n as its sole argument and then prints out the following ASCII picture: The first line consists of five spaces, followed by a '+', followed by n - 2"-"characters, followed by a final "+"sign. 2. Write a function that takes a number n as its sole argument and then prints out the following pictures using a for loop: F* **E*E FIE*KX* The height of the tree without trunk is n and there are 2n blank spaces before the trunk of the tree. The first line has 2n blanks, the second line has 2n -1 and the ith line has 2n +1-i blanks 3. Write a function that takes a single integer n as its argument. It then prints n + 1 verses of the lyrics of the following drinking song, edited to make it suitable for people under the legal drinking age or who do not want to loose their brain to intoxicating substances: 4 bottles of OJ on the wall, 4 bottles of OJ, Take on down and pass it around, 4 bottles of OJ on the wall. 3 bottles of OJ on the wall, 3 bottles of OJ, Take on down and pass it around, 3 bottles of OJ on the wall
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
