#this one I just learned about this thing

39 messages · Page 1 of 1 (latest)

tulip obsidianBOT
#

This post has been reserved for your question.

Hey @dim wyvern! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

dim wyvern
#

this one

#

there

old gulch
#

0 multiplied by anything will always be zero. Also 0! is equal to one. You should not return 0 but 1 if its 1 or 0

dim wyvern
#

WAIT DANISH COMING

#

@sturdy copper

#

HERE

old gulch
#

alright but you understand that 0*something will always result in 0

dim wyvern
#

Yes

old gulch
#

what happens when you return 0 for x ?

dim wyvern
#

Become 0

#

Oh wait I put 1 and it work

#

I do not get recursion

#

It is so stupid

#

I learn when something is return then it stop

#

Now idk anything

#

I return it and then it go back to the method then it return the x and somehow become this answer idk

slim canopy
#

do you know about the successor function in math

dim wyvern
#

No

slim canopy
#

ok so basically the kind of step down multiplication to addition is, is the same as addition to succession
S is the successor function, it's defined as:
S(0) = 1
S(1) = 2
etc

#

from the 2 given equalities above, you can say S(S(0)) = 2
this is the basis of the logic of recursion

#

suppose a function f as follows
f(0) = 0
f(n) = f(n-1) × n
this is a recursive function in math (well not exactly, the definition would look a bit different, but you get the idea)

#

from the definition, f(0) is the base case, it has a constant value

dim wyvern
#

I am getting fucked in the ass with this shit

#

I DO NOT GET IT

#

AND YT NOT HELPING

#

I HATE JAVA

#

I HATE CODING

#

STUPID ASS SHIT

#

WHY DO THEY DO THIS

#

JUET LET ME USE FOR LOOP

#

?close

#

HOW DO I CLOSEEEE

#

!close

#

CLOSE

#

HELPO