Question
Can anyone please help with this in python? Purpose: Gain a deeper understanding of loops, functions and string operations. For this project, you need to
Can anyone please help with this in python?
Purpose: Gain a deeper understanding of loops, functions and string operations.
For this project, you need to write three different functions:
Function 1: stats(). This function takes as its argument a list of numbers. It returns a tuple consisting of the minimum, maximum and average value.
Function 2:reverse(). This function takes a string as its argument. It reverses the characters in the string and returns the resultant string.
Function 3:triangle(). This function takes an integer as its argument. The function prints out a right triangle with the base and height as the input argument. For example, if
the base is 5, the triangle would be printed as:
*
* *
* *
* *
* * * * *
Also print an isosceles triangle. It would be printed as:
*
* *
* *
* *
* * * * * * * * *
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