[Tutor] python tutorial issue
Alan Gauld
alan.gauld at yahoo.co.uk
Mon Oct 19 04:42:02 EDT 2020
On 19/10/2020 01:29, Ross Wilson wrote:
> On 18/10/2563 BE 22:42, Christopher Loy wrote:
>> def fib(n): # write Fibonacci series up to n
>> “””Print a Fibonacci series up to n.”””
>> a, b= 0, 1
>> while a < n:
>> print(a, end=‘ ‘)
>
> Assuming that all the funny characters in your post were NOT in your code...
I'm seeing the "funny characters" as slanted quote signs.
Hence my reply, but...
> You appear to be using python 2 which is the standard python that is
> installed on a Mac. You can check this by executing this in your terminal:
Good catch. Its so long since I used Python 2 that
I'd forgotten that the named parameters were added
in v3. I think you've got the answer.
To the OP; if you had posted the full error message
we would have seen that in the first line of the text.
Please always post error messages in full.
--
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