progress_bar(percent, width=10) that returns a text progress bar string like "[####------] 40%" for percent=40, width=10 — the bar has width characters total, filled proportionally with # and the rest with -, followed by " <percent>%".progress_bar(40, 10)
'[####------] 40%'
40% of 10 = 4 filled chars, 6 empty.
progress_bar(100, 5)
'[#####] 100%'
Fully filled bar at 100%.
filled = round(width * percent / 100).
Build the string with "#" * filled + "-" * (width - filled).