-
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
5c4b96d
commit a976d56
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
python_basics/4.arithmetic_operators/discount_challenge.py
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,26 @@ | ||
""" | ||
* Problem Description | ||
*Suppose you are a university student and you need to pay 1536 dollars as a tuition fee. | ||
*The college is offering a 10% discount on the early payment. How much money do you have to pay if you make an early payment? | ||
*Task | ||
*Create a variable named fee and assign 1536 to it. | ||
*Create another variable discount_percent and assign 10 to it. | ||
*Compute discount and assign it to the discount variable. | ||
*Compute and print the fee you have to pay by subtracting discount from fee. | ||
""" | ||
|
||
fee = 1536 | ||
|
||
discount_percent = 10 | ||
|
||
discount = fee - (fee * 0.1) | ||
fee = discount | ||
|
||
print(fee) # Output: 1382.4 |