Re: [Tutor] Having Unusual results

2015-05-06 Thread Jag Sherrington
Excellent all working good, thank you. Regards, Jag BraveArt Multimedia On Saturday, 2 May 2015, 22:28, Dave Angel wrote: On 05/02/2015 04:36 AM, Peter Otten wrote: > Jag Sherrington wrote: > With that the calculation becomes > buns = 20 package_size = 8 whole_packa

Re: [Tutor] Having Unusual results

2015-05-02 Thread Dave Angel
On 05/02/2015 04:36 AM, Peter Otten wrote: Jag Sherrington wrote: With that the calculation becomes buns = 20 package_size = 8 whole_packages, missing_buns = divmod(buns, package_size) total_packages = whole_packages if missing_buns: total_packages += 1 ... total_packages 3 And that can b

Re: [Tutor] Having Unusual results

2015-05-02 Thread Peter Otten
Jag Sherrington wrote: > Hi Can anyone tell me where I am going wrong the end result doesn't add > up? Leaving out the Python side for a moment let's look again at one part of your problem: You need 20 buns. There are 8 buns in a package. How many packages do you need? You could say 2.5 becau

Re: [Tutor] Having Unusual results

2015-05-02 Thread Steven D'Aprano
On Sat, May 02, 2015 at 04:12:40AM +, Jag Sherrington wrote: > Hi Can anyone tell me where I am going wrong the end result doesn't add up? Hi Jag, it's hard to say exactly what's going wrong because you're posting with "Rich Text" that ends up mangling the formatting of your code something h

Re: [Tutor] Having Unusual results

2015-05-02 Thread Alan Gauld
On 02/05/15 05:12, Jag Sherrington wrote: Hi Can anyone tell me where I am going wrong the end result doesn't add up? I assume you are posting in HTML, your code is very hard to read with missing newlines. Please check your settings and post in plain text. I'm not sure what you mean by "does

Re: [Tutor] Having Unusual results

2015-05-02 Thread Ben Finney
Jag Sherrington writes: > Hi Can anyone tell me where I am going wrong the end result doesn't > add up? Maybe. first, though, you'll need to turn off any “rich text” or other fancy mangling of your message content. It makes the text undecipherable. Just compose your message as plain text, and p

[Tutor] Having Unusual results

2015-05-02 Thread Jag Sherrington
Hi Can anyone tell me where I am going wrong the end result doesn't add up? people = int(input('Enter how many people '))numdogs = int(input('Enter how many dogs ')) hotdogs = 10buns = 8dogsleft = 0bunsleft = 0 # total number of hot dogs neededdogs_needed = (numdogs * people) # how many packages o