Thanks for the input. The main thing was that the replacement fields were only
valid for their local environment.
/martin
On 29 Jun 2014, Terry Reedy wrote:
>On 6/29/2014 3:06 AM, Martin S wrote:
>
>A couple of additional notes:
>
>> x=int(input('Enter an integer '))
>> y=int(input('Enter ano
Thanks for the input. The main thing was that
On 29 Jun 2014, Terry Reedy wrote:
>On 6/29/2014 3:06 AM, Martin S wrote:
>
>A couple of additional notes:
>
>> x=int(input('Enter an integer '))
>> y=int(input('Enter another integer '))
>> z=int(input('Enter a third integer '))
>> formatStr='Intege
On 6/29/2014 3:06 AM, Martin S wrote:
A couple of additional notes:
x=int(input('Enter an integer '))
y=int(input('Enter another integer '))
z=int(input('Enter a third integer '))
formatStr='Integer {0}, {1}, {2}, and the sum is {3}.'
When the replacement fields and arguments are in the same
In article ,
Sibylle Koczian wrote:
> Am 29.06.2014 09:06, schrieb Martin S:
> > IndexError: tuple index out of range
> >
>
> {0} ... {3} are just placeholders in your format strings, they can't
> exist outside of them. And you can't put more placeholders into the
> format string than you've
Am 29.06.2014 09:06, schrieb Martin S:
x=int(input('Enter an integer '))
y=int(input('Enter another integer '))
z=int(input('Enter a third integer '))
formatStr='Integer {0}, {1}, {2}, and the sum is {3}.'
equations=formatStr.format(x,y,z,x+y+z)
print(equations)
formatStr2='{0} divided by {1} is
On Fri, Jun 27, 2014 at 4:53 AM, Martin S wrote:
> I've been following the tutorial here
> http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/
Be aware that this tutorial is aimed at Python 3.1, which is a quite
old version in the 3.x branch. I recommend you get the latest Python
(currently 3.
On 6/26/2014 11:53 AM, Martin S wrote:
Hi,
I've been following the tutorial here
http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/
But when I get to section 1.10 there is
person = input('Enter your name:')
However this generates an error
>>> person = input('Enter your name: ')
Enter
Ah, that was actually correct.
Thanks ...
/Martin S
2014-06-26 20:58 GMT+02:00 alister :
> On Thu, 26 Jun 2014 20:53:35 +0200, Martin S wrote:
>
> > Hi,
> >
> > I've been following the tutorial here
> > http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/
> > But when I get to section 1.10 th
On Thu, 26 Jun 2014 20:53:35 +0200, Martin S wrote:
> Hi,
>
> I've been following the tutorial here
> http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/
> But when I get to section 1.10 there is
>
> person = input('Enter your name: ')
>
> However this generates an error
>
>
person =