Synodic2

Synodic period between two planets (how many days until the inside planet laps the outside planet)
import sys inside = float(sys.argv[1]) outside = float(sys.argv[2]) interim1 = inside / outside if interim1 < 1: interim1 = 1 / interim1 interim2 = 1 - interim1 print ((abs(1 / interim2) + 1) * inside)
 * 1) !/usr/bin/python