XO Board Check - Medium #6
Verify board state and determine outcome. (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_xoboard(values):
result = {
"count": len(values),
"total": sum(values),
"average": round(sum(values) / len(values), 2),
}
return result
rows = [1, 1, 0]
print(summarize_xoboard(rows))
# Extended practice block for medium level.
dataset_1 = [10, 12, 14]
def checkpoint_xoboard_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.