1. Glossaryفەرهەنگی زاراوەکان
Base case
حاڵەتی بنچینە
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە

Definitionپێناسە

In , the simple case that is answered directly, without calling the function again, such as 'fact(0) is 1'. It stops the calls; without it they never end and Python stops with RecursionError.

لە ، ئەو حاڵەتە سادەیەیە کە ڕاستەوخۆ وەڵام دەدرێتەوە بەبێ بانگکردنەوەی ، وەک «⁦fact(0)⁩ دەکاتە 1». بانگکردنەکان دەوەستێنێت؛ بەبێ ئەو کۆتاییان نایەت و Python بە RecursionError دەوەستێت.

Exampleنموونە

n == 0 is the base case; n * fact(n - 1) is the recursive case.

n == 0 حاڵەتی بنچینەیە؛ n * fact(n - 1) .

def fact(n):
    if n == 0:               # base case
        return 1
    return n * fact(n - 1)   # recursive case

print(fact(3))   # 6

Other Kurdish renderings in useوەرگێڕانە کوردییەکانی تر

حاڵەتی بنچینەکە، حاڵەتێکی بنچینە

Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە

Descriptive coinage: حاڵەت (case) + بنچینە (base, as in Barzinji's «زمانی بنچینەیی» for base language). حاڵەتی بنەڕەتی is avoided because the registry lists it as an alternative of default-case. Proposed.

Related termsزاراوە پەیوەندیدارەکان

Videosڤیدیۆکان

Learn RECURSION in 5 minutes! 😵Bro Code · Englishئینگلیزی · 372K viewsبینین · 10K likesلایک

A function that calls itself: one walk written with a loop and with recursion, the base case that stops it, and why loops are faster.

کە بانگی خۆی دەکاتەوە: هەمان ڕۆیشتن جارێک بە و جارێک بە دەنووسرێت، کە ڕایدەگرێت و بۆچی خێراترن.

Python: RECURSION ExplainedProgramming and Math Tutorials · Englishئینگلیزی · 320K viewsبینین · 6.2K likesلایک · Partبەشی 2:05–5:30 (ofلە 8:45)

Learn more inزیاتر فێربە لە