Guessing Rules - Medium #4
Return game hints for low/high/correct decisions. (Python - Medium)
Goal: Apply logic with one variation. | Language: PYTHON
Typing progress
0%
Write directly over the faded code template until you reach 100%.
def summarize_guess(values):
result = {
"count": len(values),
"total": sum(values),
"average": round(sum(values) / len(values), 2),
}
return result
attempts = [1011, 1015, 1019]
print(summarize_guess(attempts))
# Extended practice block for medium level.
dataset_1 = [8, 10, 12]
def checkpoint_guess_1(values):
normalized = [value - min(values) for value in values]
weighted = [value * (1 + 1) for value in normalized]
pairs = list(zip(values, weighted))
total = sum(weighted)
average = round(total / len(weighted), 3)
return {"checkpoint": 1, "pairs": pairs, "total": total, "average": average}Time: 0s
Accuracy: 0%
Keys: 0
Typing errors: 0
Symbol errors: 0
Complete typing to 100%, then run the program.