Question: You will be writing a program that has 3 different functions in it . First, define all 3 functions. Define a function that performs a

You will be writing a program that has 3 different functions in it.
First, define all 3 functions.
Define a function that performs a mathematical square. It accepts one parameter, which is the number to be squared. The function should have a print statement that prints out the number that was passed in as an argument. Then it should perform the square. Then it should print out the resulting square.
Define a function that repeats a string 3 times. It accepts one parameter, which is the string to be repeated. The function should print that statement 3 times.
Define a function that prints the amount you should tip a waiter. It accepts two parameters: the amount of the meal, and the percentage you want to tip. The function should print both the amount of the tip itself, and the full amount of the meal, including the tip.
Next, you should call all three of your functions.
Call your squaring function 3 times with 3 different arguments
Call your string repeating function 3 times with 3 different arguments
Call your tip calculator function 3 times with 3 different sets of arguments
Your program should meet the following requirements:
Use comments as necessary to communicate to me, the reader of the program
Use a consistent naming convention for your variables (preferably using under_scores)
Use a consistent indentation format (tabs vs spaces)
Use meaningful variable names

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!