Hi Anvitha,
I think you need to save an attribute on the location named ‘AverageRating’. Then every time a new rating for that location is given, you are gonna recalculate the average rating and save it on the location. After that, you can show your locations in a list and display the average rating of every location.