2d game not spawning ball in border help

i need help im making a game where ball is randomly spawn in the screen zone but the problem is sometime its spawned in the border of the screen and sometime its impossible to see im wondering if someone have an idea how to resolve my problem here the logic below