Answered step by step
Verified Expert Solution
Link Copied!

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 =

image text in transcribedImplement 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

Students also viewed these Databases questions

Question

3. An overview of the key behaviors is presented.

Answered: 1 week ago

Question

2. The model is credible to the trainees.

Answered: 1 week ago