Python Apply Function With Multiple Variables Calculator Fractions