2019-08-08 10:31:25 -0600 received badge ● Famous Question (source) 2018-05-24 13:08:35 -0600 received badge ● Notable Question (source) 2017-12-13 15:02:36 -0600 received badge ● Popular Question (source) 2017-04-23 20:20:31 -0600 commented answer Recurrence, for-loop and zero. Thank you so much nbruin. Hope you have a good day! 2017-04-23 17:09:35 -0600 asked a question Recurrence, for-loop and zero. Hello guys! Hope you guys are having a nice day. I have some problem as follows: I setup some recurrence as follows def f(j,k): if k==0: m=j elif j==0: m=k else: m=j/k*(f(j-1,k)+1/k*(f(j-1,k)))+k/j*(f(j,k-1)+1/j*(f(j,k-1))) return m  And if we calculate f(1,1), f(2,1), f(1,2), f(2,2) in sage, then what we get are 4, 35/2, 35/2, 105/2. However, if we do the for loop as in the below, I found the above results to be zero!!: for k in range(3): for j in range(3): (j,k), expVal(j,k)  And the calculation result from the sage is: ((0, 0), 0) ((1, 0), 1) ((2, 0), 2) ((0, 1), 1) ((1, 1), 0) ((2, 1), 0) ((0, 2), 2) ((1, 2), 0) ((2, 2), 0) And observe the bolded result above... it is weird that the result is zero... Can anyone help me fix this please... Thank you for any help! Hope you have a nice rest of the day! 2017-03-19 16:26:09 -0600 commented answer Priniting Horizontally?? Thank you tmonteil. Your answer is also very helpful! I hope you have a nice day! and wish you the best luck for your future! 2017-03-19 16:26:09 -0600 commented answer Priniting Horizontally?? Thank you soooo much ndomes! This answer is very awesomeeeee! You helped me very much a lot. Thank you very much again! I hope you have a great day! And wish you the best luck for your future! 2017-03-19 14:33:25 -0600 received badge ● Scholar (source) 2017-03-18 15:50:13 -0600 asked a question Priniting Horizontally?? Hello, guys! hope you are having a good day. First of all, I'm very new to sage and this forum, so would you please be generous to my question,, please?.. So, I was trying to do some recursive/iterative calculations as follows: def calculator(L1,L2): c=0 m=len(L1) n=len(L2) print '(' if m==0: c=c+0 print '+' print c print ')' elif m==1: l1=L1[0] l2=L2[0] if l1