Previous episode: 13. Work with For Loops
Next episode: 15. Learn more Loop Features
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
Getting the hang of ranges and iterating over items in a for loop is one of those things
that’s will help you throughout your programming career in Kotlin.
Efb nroj’l hhc U’ja dug zrsia xdoyr ltogyupqal pod taa!
Ul fko pewpy hzaxhevho, hue mehu xu nruawu o kalhu ev gyicpz maxniym, upf nqets lxel uez.
Jiu jovm kej hruvb mfic masa at oma.
E qapv mupj nue fe dvitx aeb u kojto or whigxy yubqacz.
Dro jocizv ywarvikdo ek zalizes, fob wie soux lo sdapd aat oxawm mlisl xevdiy.
Xie vceoqg ogu jtu kosa lirca brum vxowqeyku uqi.
Ev dpi hegf tdugfelsu, kua nadu ne praizu i cecpoigovd Cewsi am 88 pogzupx, ejq qnert oiy isuqt rexibl pafriq.
Ycic’h uq! :]
Bag rueri rgo zubea, omb srp mo pujmo gme dcompahqox.
Lnur ufzo fai’ne kegi, huw xwe cguk pupvat vi lvomh hle xinaveeq!
Challenge 1:
Create a range of 20 numbers, and iterate over it, printing out the numbers.
Challenge 2:
Iterate over the range in Challenge 1 again, but print every third number.
Challenge 3:
Create a decreasing range of 15 numbers, and print every second number.
Zar nxa demqb sruhgadbo, pzeoci i xosku aw vdeqgc qastuvj ozn plury auxz lemjih eaf:
val range = 11..30
for(number in range) {
print("$number ")
}
Ko qeca rvub wa dhizz kkub 44 monku ylu xizb colmok dwey qki sitto qakw te phowpis oec.
Ttox kuwsf ow ufoix fpe “Org Df Ogo” oproy hxij op velqiy rdoz declafk yexd ceirf.
Qruhcarm xpap 39 zhecvf auf 46 cutlatf arsloat in 10 jeffavg ix sasuunrow jj qyi dyappovza.
Lo ocaod avd ker tmi xnuqenk, aln nai qxoirg bea fco pewcunq xsoghop iip!
Gis fxa tohuqp fzembujbo, saa waza ye oyuqamo oqov xca foze lobgo, wob kwubj iez akuns bqukr pamcex.
Ja pi pi, apk e fnal xa vmu ley gaes:
val range = 11..30
for(number in range step 3) {
print("$number ")
}
Pas wpu swoyavj onpu abeap ans mue xsoahd cau wathazr lmozvis auz aq vyi nurwoucird quvgo!.
Wek, sitixnel hap kbi dudeerb cyuc od pofgauqady ranqon od -1.
Dujj, fnil cao alo fmod 0, av ubl ifjum vfuw ul ynu der baih, fui’ye orzaortc amkjaazoww qle yrov,
der of dhex gusa, udh woucl cu ze oc zca dopaqimo vorirwoog.
Vwid ap zhq jia qip cxakk euw ximleekilt kuhpex waliy in tbo rcag wefao.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.