Question: Using Python please, write a function that accepts the number of lines as its parameter for creating the following pattern and returns the product of

Using Python please, write a function that accepts the number of lines as its parameter for creating the following pattern and returns the product of all the numbers. The function simply displays the pattern and returns the product . For the given example, below, the number of lines is 4.

4 3 2 1

3 2 1

2 1

1

If the number of lines is more than 10, do not display a pattern and display -999 as the calculated product and issue error message.

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!