Shape Painter - Medium #9
Build square/triangle/circle representation. (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 place(grid, x, y, mark):
if 0 <= y < len(grid) and 0 <= x < len(grid[0]):
grid[y][x] = mark
grid = [["." for _ in range(11)] for _ in range(11)]
x, y = 5, 5
place(grid, x, y, "X")
place(grid, x - 1, y, "L")
place(grid, x + 1, y, "R")
for row in grid:
print("".join(row))
# Extended practice block for medium level.
dataset_1 = [9, 11, 13]
def checkpoint_shapes_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)Time: 0s
Accuracy: 0%
Keys: 0
Typing errors: 0
Symbol errors: 0
Complete typing to 100%, then run the program.