[Tutor] Help - International School in Spain

Alan Gauld alan.gauld at btinternet.com
Tue Nov 17 11:03:21 EST 2015


On 17/11/15 12:27, caroline metcalf wrote:

> veg="carrots"
> print("Mashed ",veg," on the ceiling.")
> print("Green beans on the floor.")
>
> But, I am getting this.  Result:
> ('Mashed ', 'carrots', ' on the ceiling.')
> Green beans on the floor.

>
> I have tried semi-colons instead of commas as Spain uses these often but...
> I don't know what else to try.  Any ideas please?

Your code is for Python v3 but you seem to be running
it using Python v2.
This could be a problem with:
1) How you execute the script (ie what you type)
2) where you execute it from (which folder)
3) Your computer's configuration
    (did v3 get un-installed, or v2 get re-installed?)

HTH
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list