import random
...
def reset():
ball_coordinates[0] = WIDTH // 2
ball_coordinates[1] = HEIGHT // 2
# x speed - right or left
if random.randint(0, 1):
ball_speed[0] = SPEED
else:
ball_speed[0] = -SPEED
# y speed - completely random
ball_speed[1] = random.uniform(-1, 1) * SPEED
...
# We will set the initial state.
reset()