Re: [Tutor] Finding the max value from a dictionary that does not exceed a variable's value.

2016-01-30 Thread Steven D'Aprano
On Sat, Jan 30, 2016 at 02:28:50PM +, Lawrence Lorenzo wrote: > #The user enters a cost and then the amount of money given. You should > #write a program that works out what denominations of change should be > #given in pounds, 50p, 20p, 10p etc.#to do this the programme needs to > #divide

Re: [Tutor] Finding the max value from a dictionary that does not exceed a variable's value.

2016-01-30 Thread Danny Yoo
On Jan 30, 2016 12:22 PM, "Lawrence Lorenzo" wrote: > > The problem I am facing is commented in the code. Let me cut out the code, as frankly it's a *huge* distraction from your question. Here is the question you are asking: --- I want to take the max value in the dictionary 'coinvalues' that

Re: [Tutor] Finding the max value from a dictionary that does not exceed a variable's value.

2016-01-30 Thread Danny Yoo
> > Do you already know how to trailer the maximum or minimum of a list of numbers? Apologies. Substitute the word "trailer" with "take". I didn't check the output of the spelling checker as carefully as I should have. ___ Tutor maillist - Tutor@pyth

[Tutor] Import Erro:No module numpy

2016-01-30 Thread Thabo Msiza
Whenever I try to run a matlab plot program (program copied from the internet) I come up with a Error - "ImportError:No Module named numpy" but I have installed numpy several times using "pip install" and "conda update"please help ___ Tutor mailli

[Tutor] Finding the max value from a dictionary that does not exceed a variable's value.

2016-01-30 Thread Lawrence Lorenzo
The problem I am facing is commented in the code. Thanks for any help in advance.===#15 Change Return Program #The user enters a cost and then the amount of money given. You should write a

Re: [Tutor] Import Erro:No module numpy

2016-01-30 Thread Steven D'Aprano
On Sat, Jan 30, 2016 at 08:00:17PM +0200, Thabo Msiza wrote: > Whenever I try to run a matlab plot program (program copied from the > internet) I come up with a Error - "ImportError:No Module named numpy" but > I have installed numpy several times using "pip install" and "conda > update"ple

Re: [Tutor] Why define a function inside a function?

2016-01-30 Thread Ryan Smith
Thank you to both you and Ben for taking the time and answering my question! The detailed explanation of the example code I provided really helped and made things clear. As did the explanations about closures and a simplified example. I definitely have a lot to learn, but this was very educational

Re: [Tutor] Noob: nested if-clauses

2016-01-30 Thread Alan Gauld
On 30/01/16 01:06, Alan Gauld wrote: > or CD to the folder: > > C:\SOME\PATH> CD D:\mycode\abc > D: > D:\mycode\abc> Oops, that sequence should be: C:\SOME\PATH> CD D:\mycode\abc C:\SOME\PATH> D: D:\mycode\abc> sorry about that. -- Alan G Author of the Learn to Program web site http://www.