Skip to content · ⁨דלג לתוכן⁩

Count a value · ⁨ספור ערך⁩

English

Count a value

Count how often one value appears in a list.

Loop over the list and compare each item with target. It is the counter pattern again, with the condition item == target, and it works for words as well as numbers.

עברית

ספירת ערך

ספור כמה פעמים ערך אחד מופיע ברשימה.

לולאת על הרשימה והשווה כל פריט עם target. זהו שוב דפוס הספירה, עם התנאי item == target, והוא עובד גם למילים וגם למספרים.

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP