Negative index
ئیندێکسی سالب
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە Definitionپێناسە
In Python, an index below 0 that counts from the end of a list: -1 is the last item and -2 the one before it. It can hide mistakes when a user types a negative number.
لە ، کە لە 0 بچووکترە و لە کۆتایی لیستەوە دەژمێرێت: -1 دوایین دانەیە و -2 ئەوەی پێش ئەو. کاتێک بەکارهێنەر ژمارەیەکی سالب دەنووسێت دەکرێت هەڵە بشارێتەوە.
Exampleنموونە
That is why the game must check 0 <= row < 3 before it uses the numbers a player types.
لەبەر ئەوە یارییەکە دەبێت پێش بەکارهێنانی ئەو ژمارانەی یاریزان دەیاننووسێت 0 <= row < 3 بپشکنێت.
board = [['x', 'o', 'x'],
['o', 'x', 'o'],
[' ', ' ', 'o']]
print(board[-1][-1]) # o (the bottom-right cell)Other Kurdish renderings in useوەرگێڕانە کوردییەکانی تر
ئیندێکسە سالبەکە، ئیندێکسە سالبەکان، ئیندێکسێکی سالب، ئیندێکسی سالبی، ئیندێکسە سالبەکانی، ئیندێکسێکی سالبی
Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە
سالب (negative) is the owner's word in his alpha-beta article; the registry's index = ئیندێکس. Proposed.
Related termsزاراوە پەیوەندیدارەکان
Videosڤیدیۆکان
Learn more inزیاتر فێربە لە
- The Python You Need for the AI Labsئەو Pythonـەی بۆ تاقیگەکانی ژیریی دەستکرد پێویستە
- Building Tic-Tac-Toe in Pythonدروستکردنی یاریی ئێکسوئۆ بە Python
- Lists: Creating and Indexingلیستەکان: دروستکردن و ئیندێکسەکان
- Working with Stringsکارکردن لەگەڵ زنجیرەنووسەکان
- Solving a Maze with DFS and BFSچارەسەرکردنی لابیرینت بە DFS و BFS
- Search Practice: Midterm-Style Tasksڕاهێنانی گەڕان: ئەرکی وەک تاقیکردنەوەی نیوەی وەرز
- Bubble Sort, Insertion Sort and How Fast Sorting Isڕیزکردنی بڵقی، ڕیزکردن بە تێخستن و خێرایی ڕیزکردن
- Adding to a List and Finding Itemsزیادکردن بۆ لیستێک و دۆزینەوەی دانەکان
- Two-Dimensional Listsلیستە دووڕەهەندەکان
- Tuples, Sets and Dictionariesتاپڵەکان، کۆمەڵەکان و فەرهەنگەکان