[Tutor] Fwd: circular movement in pygame

diliup gabadamudalige diliupg at gmail.com
Wed Apr 29 10:03:11 CEST 2015


Thank you Alan. Understood. I already knew that. My question is

How to to do it the second way.
some code = what?
My question is, how does one arrive at the code to put in place of "some
code"? The code I used does not work correctly.
The code is in this chain of email.
I hope I am clear in what I am trying to do.



On Wed, Apr 29, 2015 at 1:18 PM, Alan Gauld <alan.gauld at btinternet.com>
wrote:

> On 29/04/15 08:15, diliup gabadamudalige wrote:
>
>  1. x = some code
>>
>> That is what I used and it worked. I was trying to find how we can do the
>> same thing by updating the current position by doing
>>
>> 2. x += some code
>>   Above 1 works. 2 does not. Why is that?
>>
>
>
> Because they do completely different things!
>
> 1 is simply
>
> x = some code
>
> 2 is
>
> x = x + some code
>
> In 2 you are adding x to some code.
>
> Of course they don't work the same.
>
> --
> 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
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>



-- 
Diliup Gabadamudalige

http://www.diliupg.com
http://soft.diliupg.com/

**********************************************************************************************
This e-mail is confidential. It may also be legally privileged. If you are
not the intended recipient or have received it in error, please delete it
and all copies from your system and notify the sender immediately by return
e-mail. Any unauthorized reading, reproducing, printing or further
dissemination of this e-mail or its contents is strictly prohibited and may
be unlawful. Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. The sender does not accept liability for any
errors or omissions.
**********************************************************************************************


More information about the Tutor mailing list