1. Glossaryفەرهەنگی زاراوەکان
Greatest common divisorGCD
گەورەترین بەشدراوی هاوبەش
Used in Kurdish course materials — not yet reviewedلە کەرەستە کوردییەکانی کۆرسدا بەکارهاتووە — هێشتا پێداچوونەوەی بۆ نەکراوە

Definitionپێناسە

The largest whole number that divides two numbers with no remainder. The GCD of 45 and 75 is 15; Python's standard library gives it with math.gcd(45, 75).

گەورەترین کە دوو ژمارە بەبێ پاشماوە دابەش دەکات. گەورەترین بەشدراوی هاوبەشی ⁦45⁩ و ⁦75⁩ دەکاتە ⁦15⁩؛ Python بە math.gcd(45, 75) دەیدات.

Exampleنموونە

A simple loop tries every k from 2 up and keeps the last one that divides both numbers.

سادە هەموو kـێک لە 2ەوە بەرەو سەرەوە تاقی دەکاتەوە و دوایین ژمارە دەهێڵێتەوە کە هەردوو ژمارەکە دابەش دەکات.

a, b = 45, 75
gcd = 1
k = 2
while k <= a and k <= b:
    if a % k == 0 and b % k == 0:
        gcd = k
    k += 1
print(gcd)   # 15

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

Kurdish Wikipedia's article for this concept is titled «گەورەترین بەشدراوی هاوبەش» (written with ھ there).

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

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