Re: [Tutor] Tutor Digest, Vol 176, Issue 13

2018-10-12 Thread Adam Eyring
Also, try (works for me in Python3) rivers = {'nile' : 'egypt', 'ohio' : 'US', 'rhine' : 'germany' } for key, value in rivers.items(): print (key) for key, value in rivers.items(): print (value) for key, value in rivers.items(): print ("The " + key + " is in the country of " + value)

Re: [Tutor] Help please

2018-10-12 Thread Adam Eyring
The program works as is in Python3. For Python2, change input to raw_input and see if that makes it work (I know it worked for me when I had Python2). Also, it looks better to use " + " instead of a comma: print("Combining these foods will you," + new_food) Also, colons and spaces are good practic

[Tutor] Python

2018-10-12 Thread Tyler Travis via Tutor
I fully understand the concept of what I am trying to do and I know that you can type out the algorithms to find mean, median, and mode but I used a shortcut by import the statistics function. Which yields the same results and the program passes with a 100% in the grading software However, it do

Re: [Tutor] Python

2018-10-12 Thread Mark Lawrence
On 12/10/18 02:41, Tyler Travis via Tutor wrote: I fully understand the concept of what I am trying to do and I know that you can type out the algorithms to find mean, median, and mode but I used a shortcut by import the statistics function. Which yields the same results and the program passes

Re: [Tutor] Help please

2018-10-12 Thread Mark Lawrence
On 12/10/18 04:31, Adam Eyring wrote: The program works as is in Python3. For Python2, change input to raw_input and see if that makes it work (I know it worked for me when I had Python2). Also, it looks better to use " + " instead of a comma: print("Combining these foods will you," + new_food)

Re: [Tutor] Python

2018-10-12 Thread Steven D'Aprano
On Thu, Oct 11, 2018 at 08:41:08PM -0500, Tyler Travis via Tutor wrote: > I fully understand the concept of what I am trying to do I'm very glad that at least one of us understands what you are trying to do, but I have no clue what it is. > and I know > that you can type out the algorithms t

Re: [Tutor] Help please

2018-10-12 Thread Alan Gauld via Tutor
On 12/10/18 04:31, Adam Eyring wrote: > Also, it looks better to use " + " instead of a comma: > print("Combining these foods will you," + new_food) It may "look better" but be aware that they don't do the same thing and the plus sign is a lot less efficient computationally since it creates a new

Re: [Tutor] Python

2018-10-12 Thread Alan Gauld via Tutor
On 12/10/18 02:41, Tyler Travis via Tutor wrote: > I used a shortcut by import the statistics function. ... > it does not print the expected output, Did you by any chance include your code as an attachment? If so this mail server will strip it out as a security risk. Please post any code in the