Hello world
Print a simple message using andika.
andika("Habari Dunia!")These SwahiliPro examples show how familiar programming ideas look when the readable commands are written in Swahili. Copy them into a .swa file and run them with the swa CLI.
Print a simple message using andika.
andika("Habari Dunia!")Store and combine values using acha.
acha jina = "Amina"
acha umri = 24
andika(jina + " ana miaka " + umri)Make decisions with ikiwa and vinginevyo.
acha umri = 20
ikiwa (umri >= 18) {
andika("Karibu")
} vinginevyo {
andika("Bado mdogo")
}Iterate through an end-exclusive range.
kwa i katika 1..5 {
andika(i)
}Create reusable logic and return a result.
jumlisha(a, b) {
rudisha a + b
}
andika(jumlisha(4, 6))Create a list, index it and append another value.
acha miji = ["Nairobi", "Mombasa"]
ongeza(miji, "Kisumu")
andika(miji[0])