QuestionQ127
VerifiedControl Flow – Conditional Blocks and LoopsThe ABC organics company requires a simple call-center program for entering survey data about a new coffee variety. The program must accept ratings on a five-star scale and return the average rating. Round the output to two decimal places.
Complete the code so that it meets these requirements.
What should be inserted in place of XXX, YYY, and ZZZ?
Drag & Drop
sum = count = done = 0 average = 0.0 while done != -1: rating = if rating == -1: break sum += rating count += 1 average = float(sum / count) +
Community Discussion