<html><head></head><body>Thanks for the input. The main thing was that <br clear="none"><br clear="none"><div class="gmail_quote">On 29 Jun 2014, Terry Reedy <tjreedy@udel.edu> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k10mail">On 6/29/2014 3:06 AM, Martin S wrote:<br clear="none"><br clear="none">A couple of additional notes:<br clear="none"><br clear="none"></pre><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">x=int(input('Enter an integer '))<br clear="none">y=int(input('Enter another integer '))<br clear="none">z=int(input('Enter a third integer '))<br clear="none">formatStr='Integer {0}, {1}, {2}, and the sum is {3}.'</blockquote><br clear="none">When the replacement fields and arguments are in the same order, the <br clear="none">indexes are optional. The following works, and might be less confusing.<br clear="none"><br clear="none">formatStr = 'Integer {}, {}, {}, and the sum is {}.'<br clear="none"><br clear="none"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">equations=formatStr.format(x,y,z,x+y+z)</blockquote><br clear="none">We no
longer have a space shortage ;-). The following is easier to read.<br clear="none"><br clear="none">equations = formatStr.format(x, y, z, x+y+z)<br clear="none"><br clear="none"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">print(equations)</blockquote><br clear="none">Compute quotient and remainder with the divmod function.<br clear="none"><br clear="none">q, r = divmod(x, y)<br clear="none"><br clear="none">Both are computed at once and x // y and x % y just toss the other <br clear="none">answer. x // y == divmod(x, y)[0], x % y == divmod(x, y)[1]<br clear="none"></blockquote></div><br clear="none">-- Sent with <b><a shape="rect" href="https://play.google.com/store/apps/details?id=com.onegravity.k10.pro2">K-@ Mail</a></b> - the evolution of emailing.</body></html>