Changed user input to avg_percent and for loop