Delivery Partner Weekly Payout

Medium ⏱ 12 min 61% acceptance ★★★★★ 4.6
Write payout(deliveries, ratings_avg) — base ₹30 per delivery; +₹500 bonus at 50+ deliveries, +₹1000 (replacing the ₹500) at 100+; a 1.1× multiplier on the delivery earnings (before bonus) when the average rating is 4.8 or above. Return the total.

Examples

Example 1
Input
payout(60, 4.9)
Output
2480.0
Explanation

60×30×1.1 = 1980, plus the 500 tier bonus.

Constraints

  • Bonuses replace, never stack.
  • Multiplier applies to per-delivery earnings only.

Topics

Business Logicgig payouts

Companies

SwiggyZomatoDunzo

Hints

Hint 1

Compute earnings, then multiplier, then bonus.

Hint 2

Tier check: 100 first, then 50.

Loading the Python runtime… Run executes your code and shows printed output; Submit checks your function against this problem's examples.