Skip to content

Instantly share code, notes, and snippets.

@odewahn
Created January 21, 2026 21:18
Show Gist options
  • Select an option

  • Save odewahn/830074aa6637abd3ba5d2a4a8e98bb0b to your computer and use it in GitHub Desktop.

Select an option

Save odewahn/830074aa6637abd3ba5d2a4a8e98bb0b to your computer and use it in GitHub Desktop.
SKO code example
def calculate_bonus(total_sales):
# Intended bonus rules:
# - Over $20,000 → 10% bonus
# - Over $10,000 → 5% bonus
# - Otherwise → 2% bonus
if total_sales > 10000:
return total_sales * 0.05
elif total_sales > 20000:
return total_sales * 0.10
else:
return total_sales * 0.02
# Example runs
print("Bonus for $8,000 in sales:", calculate_bonus(8000))
print("Bonus for $15,000 in sales:", calculate_bonus(15000))
print("Bonus for $25,000 in sales:", calculate_bonus(25000))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment