Question: How do I write this in Python? Write a function called multiply_3 that has one parameter called n . This function contains a while loop
How do I write this in Python?

Write a function called multiply_3 that has one parameter called n . This function contains a while loop that continually multiplies a number n by 3 until it is greater than 100. The function should return the final value of n. You can assume that every input value of n is greater than zero. A step by step example of sample 1: 1. n = 10 2. Since n = 10 is not greater than 100, we multiply n by 3. 3. n = 10*3; n now equals 30 4. Since n = 30 is not greater than 100, we multiply n by 3. 5. n = 30 * 3; n now equals 90 6. Since n = 90 is not greater than 100, we multiply n by 3. 7. n = 90 * 3; n now equals 270 8. Since n = 270 is greater than 100, we return 270. Notice that steps 2, 4, 6, and 8 are checking for the same condition and steps 3, 5, and 7 are all multiplying n by 3. Your task is to condense these steps into a while loop for any arbitrary value of n>0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
