Python code for simulating the planets