need help with avoiding obstacle robot

i cant make my own code because i dont know how lol.
i need some help from someone already made one if i can use his code it would be nice

That's probably not going to happen. We get too many students posting the exact same thing almost word for word ten times a day , asking us to do their homework so they can go out and party while we sweat over their code , ha , ha , ha. Well , the joke is
on them . We don't do homework. We help people who want to learn. If you want to learn. We will help you . If you just want code
(and please don't give us the sad story that your project is due in two days and you just want to pass the class) then you are probably OOL. There are tons of tutorials but you have to be more specific. We can guide you to tutorials with examples but we're not going to write your program for you.