i need to build a recursive function which calculates the average of specific numbers entered ... so its fine till now but ... it says the number of entries is determined by the user's interest .. so i got some ideas i kinda stopped here
i made a function which would ask the user if he wants to add more numbers after adding 2 numbers =
def ify(x): if (x == yes): print "enter the number" c = input() else: q = a + b/2
then i thought this would do
from wow import ify print "Enter two number" a = input() b = input() print "would you like to enter more numbers?" x = raw_input() y = ify(x) print "would you like to enter more numbers?" x = raw_input() y = ify(x)
but it didnt ....
and i got lost .. i dont know where the recusion should happen
i also had an idea in the calculation like when adding the numbers then divide by each number eg.
a + b + c / a-(a-1) + b-(b-1) + c-(c-1)
ny ideas ?