Re: [Tutor] Problem

2016-08-28 Thread Danny Yoo
On Sun, Aug 28, 2016 at 7:46 AM, shahan khan wrote: > Hello > I'm teching myself Python using MIT opencourse ware. I'm a beginner and > have some what knowledge of c and c++. I'm using Python version > Here is my code: [code cut] Before showing code, try to express what you're trying to do in

Re: [Tutor] Problem

2016-08-28 Thread Alan Gauld via Tutor
On 28/08/16 15:46, shahan khan wrote: Theorem: If it is possible to buy x, x+1,…, x+5 sets of McNuggets, for some x, then it is possible to buy any number of McNuggets >= x, given that McNuggets come in 6, 9 and 20 packs. Here is my code: for a in range(1,10): for b in range(1,5): for c in ra

Re: [Tutor] Problem

2016-08-28 Thread Joel Goldstick
On Sun, Aug 28, 2016 at 10:46 AM, shahan khan wrote: > Hello > I'm teching myself Python using MIT opencourse ware. I'm a beginner and > have some what knowledge of c and c++. I'm using Python version > > Here is the problem: > McDiophantine: Selling McNuggets > In mathematics, a Diophantine equat

[Tutor] Problem

2016-08-28 Thread shahan khan
Hello I'm teching myself Python using MIT opencourse ware. I'm a beginner and have some what knowledge of c and c++. I'm using Python version Here is the problem: McDiophantine: Selling McNuggets In mathematics, a Diophantine equation (named for Diophantus of Alexandria, a third century Greek math

Re: [Tutor] Downloading Slack Files

2016-08-28 Thread khalil zakaria Zemmoura
Just replace r.iter_content(...) By response.iter_content(...) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Downloading Slack Files

2016-08-28 Thread khalil zakaria Zemmoura
I noticed that you didn't store what requests downloaded in a new file you created. The usual pattern to use is to download a file and writing it to the HD drive. You have to create a file with "With open(file_name.extention, "wb") as f: " and write to that file. Here is the code that I suggest Wi

Re: [Tutor] project directory structure

2016-08-28 Thread Alex Kleider
On 2016-08-27 15:23, c...@zip.com.au wrote: On 27Aug2016 09:06, Alex Kleider wrote: On 2016-08-26 21:58, Ben Finney wrote: Alex Kleider writes: Am I to assume that if I have activated a virtualenv, then the following shebang #!/usr/bin/env python will use the python specified in the venv/bin