nnetemaaka
Converts a number or text into
nneteormaaka.
For a number: 0 becomes maaka, and any other number — including a negative one — becomes nnete.
For text: only the English word "true" yields nnete. Capitals do not matter — "true", "True" and "TRUE" all yield nnete. Every other string yields maaka, including "nnete", "1" and "ee". This is because p5 compares the text against the English word; it is a thing to know, not a mistake on your part.
Given a list, it returns a list of nnete/maaka values of the same length.
Syntax
Section titled “Syntax”nnetemaaka(boleng)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
boleng | sengwe | A number or text. A list of those is also accepted. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(220);
tlogelaMothalo();
diri boleng = nnetemaaka(1);
kwala(boleng);
fa (boleng === nnete) {
tlatsaMmala(0, 180, 90);
} gongwe {
tlatsaMmala(200, 40, 40);
}
kgolokwe(200, 200, 220);
}tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(220);
tlogelaMothalo();
diri a = nnetemaaka("true");
diri b = nnetemaaka("nnete");
kwala(a);
kwala(b);
// Lebokoso la molema le tala; la moja le khibidu
fa (a === nnete) {
tlatsaMmala(0, 180, 90);
} gongwe {
tlatsaMmala(200, 40, 40);
}
thalaKhutlonne(60, 150, 120, 100);
fa (b === nnete) {
tlatsaMmala(0, 180, 90);
} gongwe {
tlatsaMmala(200, 40, 40);
}
thalaKhutlonne(220, 150, 120, 100);
}