question 48 Loops & Iteration · medium
A rating bar for any scale
This program draws a film's rating as stars and dots, but only for a 5-star scale: a separate branch for every rating. The app is moving to a 10-star scale. Rewrite it with a loop so the bar has max_stars places, * for each star earned and . for the rest. For a 5-star scale it must print exactly what it prints now.
First lines
rating = 3 and max_stars = 5. Check runs your program again with other ratings and scalesPrints
Rating: ***..Expected output1 line
- 1Rating: ***..