Re: [Tutor] Creating lists with definite (n) items without repetitions

2015-09-15 Thread Francesco A. Loffredo via Tutor
On 14/09/2015 13:50, Oscar Benjamin wrote: On 10 September 2015 at 08:45, Francesco Loffredo via Tutor wrote: I wrote a small routine (below) to check when and if my code and the formula do match. It easily shows that they only match for len(pool) == (2 ** N) - 1, with N greater or equal to 2.

Re: [Tutor] syntax error

2015-09-15 Thread Alan Gauld
On 15/09/15 02:41, Nym City via Tutor wrote: Hello, I am also just trying to understand this code and could not understand the print statement.I would have just used: print('cost:$',gross_cost) Do you mind telling little bit about what: print('cost: ${:.2f}'.format(gross_cost)) does do and why

Re: [Tutor] Syntax error and EOL Error

2015-09-15 Thread Nym City via Tutor
-Thank you very much for your feedback. It was definitely helpful. I will try to stay consistent with my coding style in the future projects.   On Sunday, September 13, 2015 3:01 PM, Danny Yoo wrote: On Sun, Sep 13, 2015 at 7:20 AM, Nym City via Tutor wrote: > Hello, > Sorry fo

Re: [Tutor] syntax error

2015-09-15 Thread Nym City via Tutor
Hello, I am also just trying to understand this code and could not understand the print statement.I would have just used: print('cost:$',gross_cost) Do you mind telling little bit about what: print('cost: ${:.2f}'.format(gross_cost)) does do and why one would use this over my plain version?  T