Rating with Stars in App

Hi Team,

Is it possible to show rating with stars in app on the basis of user performance. Like :

• If a user completes 8 tasks out of 10, it should show **** (4 stars) against his/her name.
• If a user completes 6 tasks out of 10, it should show *** (3 stars) against his/her name.
• If a user completes 4 tasks out of 10, it should show ** (2 stars) against his/her name.

That would be very helpful for me if there is any work around.