Question: Hello, I need help solving this Python problem. Code a Python program to compute the largest increase that occurred in the price of a stock

Hello, I need help solving this Python problem.

Code a Python program to compute the largest increase that occurred in the price of a stock during a 10-day period. The program should read any 10 integers that represent stock prices, e.g.,

48544947626459707582

and then print a message like:

Largest increase of15

from 47to 62

occurred between day #4 and day #5.

You must design the program in such a way to that to change the number of days from 10 to 30 (for example) merely requires changing one constant variable declaration. Be sure your program does something "reasonable" if the price never increases!

The solution cannot use a separate variable for each of the 10 days, nor can it use a Python list!

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 Programming Questions!