On Mon, Oct 29, 2012 at 12:26 PM, Christophe BAL <projet...@gmail.com> wrote:
> Hello,
> the following code takes more than one minute to acheive its job.
>
> Is there some technical problem with the server ?

Yes, it doesn't know French.   Get rid of the e with the accent over it in :

         print "Nombre de divisions effectuées : ", str(nbreEtape)

and the code should work.

I tested your code on http://salv.us and it *also* didn't work there
--- I'll be careful to fix this for salv.us!

William

>
> Christophe
>
>
> ==== Simple code =====
>
> def pgcdBoucle(a, b):
>     n = 0
>
>     if b > a:
>         a, b = b, a
>
>     while(b != 0):
>         a, b = b, a%b
>         n += 1
>
>     return (a, n)
>
> # Test simple
> res, nbreEtape = pgcdBoucle(25,30)
>
> print res
> print "Nombre de divisions effectuées : ", str(nbreEtape)
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To post to this group, send email to sage-support@googlegroups.com.
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support?hl=en.
>
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to