Skip to content

Instantly share code, notes, and snippets.

@jini0059
Created October 2, 2024 01:12
Show Gist options
  • Save jini0059/f89b86b0bf3d055ef17620eccb441fff to your computer and use it in GitHub Desktop.
Save jini0059/f89b86b0bf3d055ef17620eccb441fff to your computer and use it in GitHub Desktop.
nomad python challenge
# 👇🏻 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):
if profit > 100000:
return profit * 0.25
else:
return profit * 0.15
def apply_tax_credits(tax_amount, tax_credits):
return tax_amount * tax_credits
# /YOUR CODE
# 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