On 08/03/2017 10:21 AM, Alan Gauld via Tutor wrote:
> On 03/08/17 11:05, Abdur-Rahmaan Janhangeer wrote:
>> me i cooked up :...
>
> Yes that works too, especially if you don;t need access
> to the individual prices later.
>
> There are a couple of things to make it more Pythonic...
>
>> x =
On 03/08/17 11:05, Abdur-Rahmaan Janhangeer wrote:
> me i cooked up :...
Yes that works too, especially if you don;t need access
to the individual prices later.
There are a couple of things to make it more Pythonic...
> x = True
> sum = 0
>
> while (x==True):
> a = input("input:")
> if
me i cooked up :
[warning : see code above better but i did it a bit differently]
x = True
sum = 0
while (x==True):
a = input("input:")
if a =="exit":
x=False
try:
sum += float(a)
except:
pass
print("sum :",sum)
On Thu, Aug 3, 2017 at 3:09 AM, Alan
I'[ve CCd the list, please use ReplyAll when responding to the list.
On 02/08/17 22:13, Borisco Bizaro wrote:
> Hi,am try to write a code that take input from user continuently
> until key press it stop and give total amount user enter.
> while True:
> input ("enter another