Answer:
stockprice = input("Please enter stock prices: ")
prices = stockprice.split(",")
least = int(prices[0])
highest = int(prices[0])
for price in prices:
if int(price) < least:
least=int(price)
if int(price) > highest:
highest=int(price)
index = prices.index(str(highest))
print("Highest price: "+str(highest)+" ocurred on day # "+str(index))
index = prices.index(str(least))
print("Lowest price: "+str(least)+" ocurred on day # "+str(index))
Explanation:
<em>I added the explanation as an attachment where comments were used to explain each line one after the other.</em>
<em>PS: The question is answered in Python</em>