Definitionپێناسە
The spaces at the start of a line of code. In Python, indentation is part of the : all lines of a must start with the same number of spaces, usually 4. Most other languages mark blocks with braces { } and indent only to make code easy to read.
ئەو بۆشاییانەن کە لە سەرەتای دێڕێکی کۆددا دادەنرێن. لە Pythonـدا بۆشایی سەرەتای دێڕ بەشێکە لە : دێڕەکانی (جەستەی if، یان ) دەبێت بە هەمان ئەندازە بچنە ناوەوە، زۆرجار 4 بۆشایی. زۆربەی زمانەکانی تر کەوانەی { } بەکار دەهێنن و بۆشایی تەنها بۆ ئاسانکردنی خوێندنەوە دادەنێن.
Exampleنموونە
The first print belongs to the if because it is indented; without the 4 spaces Python stops with IndentationError.
یەکەم print سەر بە ifـە چونکە بۆشایی سەرەتای دێڕی هەیە؛ بەبێ ئەو 4 بۆشاییە Python بە IndentationError دەوەستێت.
score = 7
if score > 5:
print("Pass") # indented: inside the if
print("Done") # not indented: after the ifOther Kurdish renderings in useوەرگێڕانە کوردییەکانی تر
ئیندێنت
Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە
Descriptive coinage on the registry's whitespace (بۆشایی): the space at the start of a line. Many students say ئیندێنت. The AI course's lessons (ai-python-for-ai-labs, ai-agent-programs) already write «بۆشاییی سەرەتای دێڕ» for it. Proposed.
Related termsزاراوە پەیوەندیدارەکان
Videosڤیدیۆکان
Indentation is the leading whitespace before a statement; in Python it marks which lines form a block, where C uses braces.
ئەو کە پێش دادەنرێت؛ لە دیاری دەکات کام دێڕانە پێکدەهێنن، لە کاتێکدا C کەوانەی { } بەکاردەهێنێت.
Learn more inزیاتر فێربە لە
- Your First Program: print() and Commentsیەکەم بەرنامە:
print()و لێدوانەکان - Making Decisions: if, elif, elseبڕیاردان:
if،elifوelse - Programming Languagesزمانەکانی بەرنامەسازی
- Nested Loops and Patternsخولە ناوەکییەکان و کێشانی شێوە
- Defining and Calling Functionsناساندن و بانگکردنی کردارەکان
- Python Next to JavaPython لە تەنیشت Javaـەوە
- Agent Programs, Pseudocode and Algorithm Analysisبەرنامەکانی ئەیجێنت، نیمچەکۆد و شیکارکردنی ئەلگۆریزم
- Making Decisions: Relational Operators and if / elseif / elseبڕیاردان: کارپێکەرەکانی بەراوردکردن و if / elseif / else
- Meet Dartناسینی Dart
- The for Loop and range()خولی for و
range() - The Python You Need for the AI Labsئەو Pythonـەی بۆ تاقیگەکانی ژیریی دەستکرد پێویستە
- Word Processing Essentialsبنەماکانی بەرنامەی نووسینی دەق
- The while Loopخولی while
- Controlling Loops: break and continueکۆنترۆڵکردنی خولەکان:
breakوcontinue - Variable Scope: Local and Globalمەودای گۆڕاوەکان: ناوخۆیی و گشتی
- Decorating a Container: Border, Radius, Shadow, Transformڕازاندنەوەی Container: سنوور، گۆشەی خڕ، سێبەر، transform
- Text, Images and Iconsدەق، وێنە و ئایکۆنەکان