robotic

How do i code for a robot which moves exactly 50cm in a straight line and then takes 60∘ clockwise turn and then moves 30cm in a straight line and then comes back to the initial point???plz help

What about making it a line-follower? Therefore, you could create the path you want your robot to take using for example some black electrical tape, and then you could have your robot follow that path.

Or does this robot have to be very precise?

It has to be precise. This is my project. I'm still new to this so I'm confused how to code it.

How do i code for a robot which moves exactly 50cm in a straight line

First, the Arduino has no way of knowing, unless you have sensors attached, that it is moving in a straight line.

Second, the Arduino has no way of knowing, unless you have sensors attached, that it has traveled 50 cm.

So, the simplest solution to your problem is to make the robot move on a rail, and put a wall at the 50 cm. mark.

and then takes 60∘ clockwise turn

How is the Arduino supposed to know that some other device has turned exactly 60 degrees?

Dondor:
How do i code for a robot which moves exactly 50cm in a straight line and then takes 60∘ clockwise turn and then moves 30cm in a straight line and then comes back to the initial point???plz help

Depends on the robot. What capabilities does it have? Is it designed for accurate dead-reckoning
like a turtlebot?

What if we dont use sensors..??using just the motors and an arduino chip..??would it work
Can we can assume the distance it travelled be taken from the no of rotations the wheel gives??

What if we dont use sensors..??

Then you haven't a hope in hell of going in a straight line, knowing when you have traveled some specific distance, OR turned some specific amount.

would it work

No.

Can we can assume the distance it travelled be taken from the no of rotations the wheel gives??

No. You have no way of ensuring that there is no slippage. You have no way of ensuring that both wheels have exactly the same diameter. Without external sensors, you have no way of knowing how many rotations the wheel has turned.