Python 3 Script to Calculate Profile or Loss of Products Full Project For Beginners

Python 3 Script to Calculate Profile or Loss of Products Full Project For Beginners

 

Welcome folks today in this blog post we will be calculating profit or loss of products.All the full source code of the application is given below.

 

 

Get Started

 

 

In order to get started you need to make an app.py file and copy paste the following code

 

app.py

 

# Python Program to Calculate Profit or Loss
 
actual_cost = float(input(" Please Enter the Actual Product Price: "))
sale_amount = float(input(" Please Enter the Sales Amount: "))
 
if(actual_cost > sale_amount):
    amount = actual_cost - sale_amount
    print("Total Loss Amount = {0}".format(amount))
elif(sale_amount > actual_cost):
    amount = sale_amount - actual_cost
    print("Total Profit = {0}".format(amount))
else:
    print("No Profit No Loss!!!")

 

See also  Python 3 Tkinter Flappy Bird GUI Desktop Game Using Random Library Full Project For Beginners

 

Now if you execute the python script by typing the below command as shown below

 

python app.py

 

Leave a Reply