Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Implement the following functions. For this problem, you are not allowed to use string multiplication. So, statements such as print(symbol * i) or my_string =
Implement the following functions. For this problem, you are not allowed to use string multiplication. So, statements such as print(symbol * i) or my_string = symbol * i are NOT allowed. Both Problems please. This is Python3 using visual studio code.
(c) Write a function printUpTriangle() that takes two parameters, width (int) and symbol (string), and prints a right side up triangle using symbol on the screen width is a number that determines the width of the base of the triangle. For example printUpTriangle(3,"T") should produce the following: T TT ITT (d) Write a function printDown Triangle() that takes two parameters, width (int) and symbol (string), and prints an upside down triangle using symbol on the screen. width is a number that determines the width of the base of the triangle. For example printDownTriangle(5,"#") should produce the following: ##### #### ### ## # HINT: You can use a negative increment with the range functions (e.g. range (10,0,-1))Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started