Re: [Tutor] sumHighest function help

2016-11-04 Thread cs
Interesting. Tracey Jones has a very similar question... - Cameron Simpson On 04Nov2016 16:44, Lloyd Francis wrote: Hi, I want to write a function that will calculate and return the sum of the *n* highest value in a list *a. *Also, when n is less than

Re: [Tutor] sumHighest function help

2016-11-04 Thread Alan Gauld via Tutor
On 04/11/16 16:44, Lloyd Francis wrote: It looks suspiciously like you posted this same message from two addresses with different subjects, please don't do that as it splits the responses and makes searching archives more difficult. > I want to write a function that will calculate and return the

Re: [Tutor] Code not working advise pls

2016-11-04 Thread Cameron Simpson
On 04Nov2016 21:57, tracey jones-Francis wrote: I want to write a function that will calculate and return the sum of the n highest value in a list a. Also, when n is less than 0, the answer should be zero, and if n is greater than the number of elements in the list,

[Tutor] sumHighest function help

2016-11-04 Thread Lloyd Francis
Hi, I want to write a function that will calculate and return the sum of the *n* highest value in a list *a. *Also, when n is less than 0, the answer should be zero, and if n is greater than the number of elements in the list, all elements should be included in the sum. In addition i want to

[Tutor] Code not working advise pls

2016-11-04 Thread tracey jones-Francis
Hi, I want to write a function that will calculate and return the sum of the n highest value in a list a. Also, when n is less than 0, the answer should be zero, and if n is greater than the number of elements in the list, all elements should be included in the sum. In addition i want to

[Tutor] Fwd: Re: tar a directory

2016-11-04 Thread Alan Gauld via Tutor
Always use reply-all or reply-list when responding to tutor posts == The archive file changes each time so I need to set a variable based on the changing directory Sent from my iPhone > On Nov 4, 2016, at 5:54 AM, Alan Gauld via Tutor wrote:

Re: [Tutor] tar a directory

2016-11-04 Thread Alan Gauld via Tutor
On 03/11/16 17:56, Bill Nolf wrote: > Test 4 > > archive = tarfile.open("test.tgz", "a:gz") > archive.add=(dirarchive, arcname="test") > archive.close() > > Create a gzip file called test.tgz in the current directory, which is close > but no cigar > What I would like is the following gzip file: