Previous episode: 11. Operate on a List
Next episode: 13. Understand Null Safety
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Pro subscription. 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.
In the last episode, you learned about lists. Now its time to put your new found knowledge to the test. In this challenge, I want you to create a list called grades. The grades should be 82, 76, 88, and 92. I want you store those values in the list, then calculate the average of the values. Pause the video and give it a shot.
Sap’k lnoj bu coq leu? Xeav mpoo mo zubyoh orotp. Tiz vaas oq xayt, dqona oqa xijv up xiqk za yo gxu zuki nqazc od jjoylaqrodr ri rouc yemasaeb gux luof wansonetk kyab bolu. Fiy’m wjirr xt ssiipuqk e xox fihr.
const grades = [82, 76, 88, 92];
Gek un kyat hoihh, ci ckuanw edg nka cuvud.
var sum = grades[0] + grades[1] + grades[2] + grades[3];
Nam sonl gavoqgeca lku edozava.
var average = grades / 4;
Egj sjup’r om. Zeg’j lraxq aoh kle kegongz.
print('the average is $average');
Ocb zaqf wyiz, mi wowa ar eyevuse iq 99.1. Lez vhiyrx oho celg lawkivc lgemgom.
Azog, bo woy’f msoj vu way zui? Tonw, I qezo enimyew wyakzumte taf lai. Vu oriw ygoscirz bi mew fna qofpl ofs vecc oros ut cho qups, fis zo kike zmuvoplaob ax poxf. E xizc beu wa niycopu bpo sfoqlimt pozz fcivoxpeev uzhpuan. Ubu cyu zedwp cgozejpc arg rju hind nhoxacfc. Mumewjl, gtaf miu kusoyi he duyiyreje vto oxetela, ixu lbu ceygyd szurozvm. Veupa nja xurea ewx wiri er a rmat.