Të përgjithshme

Debug

Në shqip: Rregullim i gabimeve

ShpjegimiSQ

Debug-imi është procesi i gjetjes dhe rregullimit të bug-eve. Zakonisht printon vlera, lexon mesazhet e gabimit dhe e ndjek kodin hap pas hapi, derisa të gjesh ku ngec.

EnglishEN

Debugging is the process of finding and fixing bugs. You usually print values, read the error messages and follow the code step by step until you find where it goes wrong.

Si ta mendosh

Si mekaniku që kërkon pse s'ndizet vetura: kontrollon baterinë, pastaj karburantin, pastaj kandelat — një nga një, derisa ta gjejë shkakun.

Lexoje në anglisht

Like a mechanic working out why a car won't start: they check the battery, then the fuel, then the spark plugs — one by one, until they find the cause.

Shembull kodipython

def mesatarja(notat):
    print("notat:", notat)  # shohim çfarë hyn në funksion
    return sum(notat) / len(notat)

mesatarja([8, 9, 10])

Terma të lidhur