It sounds like you've hit a known issue with this program. Is this what's happening? The ball hits the side of the paddle or a brick and it starts bouncing inside the paddle or brick until it emerges from the other end, or forever. Here's what's happening. Because the ball hits the side of the paddle or brick, it is able to get inside of the other object. Once this happens, the code sees this as a continuous collision and just keeps rapidly reversing direction. The solution is to apply a little logic and physics.
For the brick, the solution is simple. As soon as the ball collides with a brick, delete the brick. No more collision, but remember to bounce.
For the paddle, think about what can and should happen. The ball can only hit the paddle if it is moving down, a positive y velocity. if it were moving up, that means that it must have already bounced off the bottom of the window, but that means that the player just lost a life. So, that means that the ball can never hit the paddle with a negative y velocity. If you know this, then you can use that info in the logic. If the ball collides with the paddle, do this:
y_velocity = -abs(y_velocity); This will force the ball to go up instead of bouncing back and forth inside the paddle.
This is the simple solution, and what I used. A far more complicated solution is to detect which side of the paddle is being hit by the ball and making the appropriate velocity change. Hitting the top or bottom would change the y_velocity, while hitting either side means reversing the x_velocity. The complicated part would be to detect which side of the paddle is being hit, and is beyond the scope of the assignment. (maybe in the hacker edition?)
IF this answers your question, please accept this answer to mark the question as answered. Let's keep up on forum housekeeping. ;-)