I'm sorry, i made a mistacke !

def foo(n,m):
...     sum = n
...     if m>1:
...             sum+=foo(n,m-1)
...     return sum


2014-06-08 12:19 GMT-03:00 Thiago borges dos reis <thiago...@gmail.com>:

> without identaction !!!
>
> def foo(n, m):
>  sum = 0
>    while m > 0:
>        sum = sum + n
>        m = m -1
>    return sum
>
>
> 2014-06-08 12:06 GMT-03:00 hito koto <hitokoto2...@gmail.com>:
>
> Hi,
>>
>> I want to change recursive definition from  function,
>>
>> this code change to recursive definition, So how can i do to?
>>
>> def foo(n, m):
>>  sum = 0
>> while m > 0:
>> sum = sum + n
>> m = m -1
>> return sum
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/65921e2a-7b85-49fb-886b-90b847be8c06%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/65921e2a-7b85-49fb-886b-90b847be8c06%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHQaGTCHJQyAE9O2YWnm%2BN2yRbynm%3Dgz3V2KAJVNQ7HgBbPgtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to