-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5ccb71
commit 7fce1eb
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#QUESTION: if cost and selling price of the item enter through the keyboard.write a program\nto determinewether the seller has made profit or loss or no profit no loss.Also determine how much profit or loss he incurred? | ||
#its the part of the if else loop. | ||
|
||
|
||
cost_price=int(input('Enter the cost price of the item:- ')) | ||
sell_price=int(input('Enter the sell price of the item:- ')) | ||
|
||
if cost_price>sell_price: #if cost price is higher the selling | ||
loss=cost_price-sell_price | ||
print('You sell the item in low price you made the loss of rs=',loss) | ||
if sell_price>cost_price: #if sell price is higher the Cost | ||
profit=sell_price-cost_price | ||
print('Congrats You sell the item with profit rs=',profit) | ||
else: #if sell price is equal the Cost price | ||
print("You make no profit no loss :-) ") |