How can I break down decimals into # of years and days?
<p>I am a beginner programmer and here is my program so far:</p>

<pre><code>    def getYearsandDays():  
        c = eval(input("Enter a number: "))  
        d = c // 1  
        e = (c - d) * 365  
        f = e // 1  
        return f,d  
        print(d , "years and", f, "days")  

    ()  
</code></pre>

<p>For example, suppose that c is 1.34. Converting that to an integer gives you 1 year = d . Now 1.34 - 1 gives you .34. Multiplying that by 356 gives you  124.1 = e . Making that an integer gives you 124 days = f. So 1.34 years is 1 year(d) and 124 days(f).</p>

<p>I already know my print function is wrong because I'm stuck as to how would I get outputs like this:  </p>

<pre><code>6 years and 1 day  
1 year and 137 days  
67 days  
</code></pre>

<p>Instead of:</p>

<pre><code>6 years and 1 days  
1 years and 137 days  
0 years and 67 days  
</code></pre>

<p>I'm guessing I might have to convert my integers back to strings and make If-Then statements, but I'm not 100% sure.</p>
