Hi Richard, Sure, I'll wait. //JL -----Original Message----- From: pythonvis-bounce@xxxxxxxxxxxxx [mailto:pythonvis-bounce@xxxxxxxxxxxxx] On Behalf Of Richard Dinger Sent: Sunday, May 18, 2014 7:07 AM To: pythonvis@xxxxxxxxxxxxx Subject: [pythonvis] Joseph Re: Re: exercise discussion Joseph - My intention was to first let the more inexperienced members try to solve the puzzle. Then maybe use it as an example of first solving and then refining the solution. I just don't know if revealing a solution like yours is helpful or harmful. On the one hand it shows a working solution, but on the other it may eliminate the challenge and turn students into spectators. I think there is more than one approach to the problem and I would like to see some student approaches too. So in answer to your question, could you wait a week or two to see what happens? Richard -----Original Message----- From: Joseph Lee Sent: Sunday, May 18, 2014 3:22 AM To: pythonvis@xxxxxxxxxxxxx Subject: [pythonvis] Re: exercise discussion Hi Ivan, Ah, okay. Let's try this way: For retailer problem, examine what would the following code fragments will do (without using the Pythone interpreter first): 1. 24.95/10*6 2. 24.95*(0.6) 3. float(24.95*0.6) Now try running these fragments in the interpreter and write down what you hear/see/read. Then write down similarities and differences in the reply (hint: two of them do the same thing). For the walking problem, can you tell us the exercise, any hints that the book provides, how will you solve it and what you wrote (code) in the reply so we can provide some comments? In other words, what I'm personally after is how you are thinking about the problem, not just cooking up a quick solution. Thanks. Cheers, Joseph P.S. Richard, would it be okay for us to publish our solution to your number divisibility problem here? -----Original Message----- From: pythonvis-bounce@xxxxxxxxxxxxx [mailto:pythonvis-bounce@xxxxxxxxxxxxx] On Behalf Of Ivan Pivac Sent: Sunday, May 18, 2014 3:03 AM To: pythonvis@xxxxxxxxxxxxx Subject: [pythonvis] exercise discussion Hi everyone, Since Thursday's learning room meeting, I have been working my way through the two exercises at the end of chapter 2 in the book, Think Like a Computer Scientist. I wonder if if would be a a good idea to go through these two exercises, looking at the code and how best to produce the final output? In the first task looking at the cost of retailing books, I resolved the problem, but, I wonder if my code could be more efficiently written. One question in this exercise is how to write the code where the retail cost of the book is $24.95 but the dealer receives a 40% discount. My solution was: 24.95/10*6 however, the code didn't seem correct to me although the answer was after doing the maths on a calculator. . In exercise two regarding what time a walker returned home, I have the total time taken to walk the distance but don't know how to add those minutes onto the time of 6.52 am. Would it be worth while, I wonder, if the experts on the list could actually code the exercises as we work through them so that we can discuss the tasks on the learning room forum? there may be several ways of producing the answer so examining those methods would also be an invaluable learning experience. Meanwhile, I'll continue working on the home arrival time. Regards Ivan -- Ivan Pivac 4271 Great North Rd P O Box 69-203 Glendene Auckland 0645 New Zealand Tel: (64) 9 836-8876 Fax: (64) 9 836-4668 Email: ivan@xxxxxxxxxxxxx --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com