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
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