Created
September 3, 2025 00:39
-
-
Save writer0713/5915b3436efc196c43929060eaac307d to your computer and use it in GitHub Desktop.
nomadcoders python challenge - Assignment 3
This file contains hidden or 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
| # ππ» YOUR CODE ππ»: | |
| # /YOUR CODE | |
| def get_yearly_revenue(monthly_revenue): | |
| """ | |
| μκ°λ§€μΆμ μΈμλ‘ λ°μμ μ°κ° λ§€μΆμ 리ν΄νλ ν¨μ | |
| """ | |
| return monthly_revenue * 12 | |
| def get_yearly_expenses(monthly_expenses): | |
| """ | |
| μκ°λΉμ©μ μΈμλ‘ λ°μμ μ°κ° λΉμ©μ 리ν΄νλ ν¨μ | |
| """ | |
| return monthly_expenses * 12 | |
| def get_tax_amount(profit): | |
| """ | |
| μ΄μ΅μ μΈμλ‘ λ°μμ, μ΄μ΅μ΄ 100,000λ³΄λ€ ν¬λ©΄ 25% μΈμ¨μ μ μ©νκ³ , ν¬μ§ | |
| μμΌλ©΄ 15% μΈμ¨μ μ μ©ν΄μ μΈκΈκΈμ‘μ 리ν΄νλ ν¨μ | |
| """ | |
| if profit > 100000: | |
| return profit * 0.25 | |
| else: | |
| return profit * 0.15 | |
| def apply_tax_credits(tax_amount, tax_credits): | |
| """ | |
| μΈκΈκΈμ‘. μΈμ‘곡μ μ¨μ μΈμλ‘ λ°μμ, 곡μ ν κΈμ‘μ 리ν΄νλ ν¨μ | |
| """ | |
| return tax_amount - tax_amount * tax_credits | |
| # BLUEPRINT | DONT EDIT | |
| monthly_revenue = 5500000 | |
| monthly_expenses = 2700000 | |
| tax_credits = 0.01 | |
| yearly_revenue = get_yearly_revenue(monthly_revenue) | |
| yearly_expenses = get_yearly_expenses(monthly_expenses) | |
| profit = yearly_revenue - yearly_expenses | |
| tax_amount = get_tax_amount(profit) | |
| final_tax_amount = tax_amount - apply_tax_credits(tax_amount, tax_credits) | |
| print(f"Your tax bill is: ${final_tax_amount}") | |
| # /BLUEPRINT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment