<div dir="ltr"><div>I'm only a few days in to learning Python, so please bear with me.</div><div><br></div>I need to line up the decimals on the printed information but I cannot get the text to look uniform at all.<div>
<br></div><div><br></div><div>Here is my code:</div><div><div><br></div><div>def main():</div><div><br></div><div>    # Set up constants for cost per yard, flat fee, and tax rate</div><div>    cost_carpet = 5.50</div><div>
    fee = 25</div><div>    tax = .06</div><div><br></div><div>    # Ask for yards needed</div><div>    yards_needed = float(input('Please enter the total number of yards needed '))</div><div><br></div><div>    # Calculate subtotal</div>
<div>    subtotal = yards_needed * cost_carpet + fee</div><div><br></div><div>    # Calculate tax_rate</div><div>    tax_rate = subtotal * tax</div><div><br></div><div>    # Calculate total_due</div><div>    total_due = subtotal + tax_rate</div>
<div><br></div><div>     # Print blank line</div><div>    print()</div><div><br></div><div>    # Print infomation</div><div>    print("The cost of the carpet is <span class="" style="white-space:pre">   </span>$", format(subtotal,'9,.2f'))</div>
<div>    print("The flat fee is <span class="" style="white-space:pre">            </span>$", format(fee,'9,.2f'))</div><div>    print("The tax is <span class="" style="white-space:pre">                   </span>$", format(tax_rate,'9,.2f'))</div>
<div>    print("The total due is <span class="" style="white-space:pre">           </span>$", format(total_due,'9,.2f'))</div><div>    </div><div><br></div><div>main ()</div></div><div><br></div><div><br></div><div>
<br></div><div><br></div><div>Thank you in advance,</div><div>Jenny</div><div><br></div></div>