Problem 186427 · easy · Phase 01 Prerequisites & Setup

Fundraiser Progress Bar

functions · percentages · integer division

A charity website shows a progress bar. Write fundraiser_percent(raised, goal) that returns the percentage of the goal reached, rounded down to a whole number and never above 100.

Examples

Input:  raised = 250, goal = 1000
Output: 25

Input:  raised = 999, goal = 1000
Output: 99

Input:  raised = 1500, goal = 1000
Output: 100

Constraints

  • 0 <= raised <= 10**9
  • 1 <= goal <= 10**9
  • Return an integer

Goals

  • Compute a percentage with integer arithmetic
  • Cap a value with `min`
Starting Python…