I am facing problem in question 5 in conditional problems for batch 27. Like i didn't understand how to proceed.
Problem 6: Stock Profit/Loss Calculator with Multiple Conditions
Description: Develop a Python program for stock traders to calculate their profit or loss from stock transactions. The program should ask users to input their purchase price, selling price, and the number of shares they traded. Based on these inputs, the program calculates the total profit or loss. Additionally, it categorizes the profit or loss into 'High', 'Moderate', or 'Low' based on predefined thresholds: profits or losses above $2000 are 'High', between $1000 and $2000 are 'Moderate', and below $1000 are 'Low'. For losses, just label them as 'Loss'.
Sample Input:
Enter purchase price: 100
Enter selling price: 121
Enter number of shares: 50
Expected Output:
Profit: $1050.00
Profit Category: Moderate
please guide for this question. i am sharing link for my google colab where i have solved the problem and saw a different solution you provided. So kindly check if my solution is also right or wrong. Request to please explain in class.