No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
The following is a recursive function designed to return the factorial of a number. [CODE] def factorial(number, target): if number == 1: return target else: target = target*number factorial((number-1), target) print factorial(7, 1) [/CODE] As you'll see if you run it however it doesn't return my 'target' variable (the factorial … | |
Re:
Is it possible to sort a list of numbers from largest to smallest? Like if I had a list of numbers in variable a | |
Re:
Hello fellows... Is there something like static function variables in python? I know there are static attributes of a class, but what if i want to use a static variable inside a function? somthing like this (stupid) code in c++ for example: [code]int static_num() { static int x = 0; … |