This one is one of the challenges that i have done, its neme is ''Simple snowman''. khan Academy already gives you the three first codifications from the three first ellipses, but then you must complete it with all the elements and codifications that you have learned with some helping videos.
And this is the code:
background(132, 238, 240);
ellipse(200,305,150,150);
ellipse(200,216,110,110);
ellipse(200,150,70,70);
line(240,200,302,130);
line(156,197,92,127);
line(211,168,191,168);
fill(0, 0, 0);
ellipse(186,137,11,11);
ellipse(213,137,11,11);
ellipse(200,211,10,10);
ellipse(200,229,10,10);
ellipse(200,249,10,10);
And this one is one of my succesful projects, that is called "the wild animal''. It is not an offensive animal, but i find it cute, thats why i pick this project instead of the other projects.
Code:
background(31, 135, 83);
fill(255, 255, 255);
ellipse(200, 171, 130, 138);//body
ellipse(200, 97, 85, 80);//head
ellipse(200,111,44,20);//mouth
fill(0, 0, 0);
ellipse(232,65,31,31);//right ear
ellipse(166,65,31,31);//left ear
ellipse(240,214,50,50);//right foot
ellipse(163,214,50,50);//left foot
ellipse(151,146,40,40);//left hand
ellipse(249,146,40,40); //right hand
ellipse(200,107,-19,10);//nose
line(209,116,188,115);//mouth
ellipse(213,87,11,10);//right eye
ellipse(188,87,11,10);//left eye
fill(124, 201, 106);
rect(-1,239,400,161);//floor
fill(242, 232, 89);
ellipse(31,32,50,50);
fill(118, 209, 102);
strokeWeight(5); stroke (132, 240, 168);
line(109,43,112,239);
line(82,127,84,237);
background(31, 135, 83);
fill(255, 255, 255);
ellipse(200, 171, 130, 138);//body
ellipse(200, 97, 85, 80);//head
ellipse(200,111,44,20);//mouth
fill(0, 0, 0);
ellipse(232,65,31,31);//right ear
ellipse(166,65,31,31);//left ear
ellipse(240,214,50,50);//right foot
ellipse(163,214,50,50);//left foot
ellipse(151,146,40,40);//left hand
ellipse(249,146,40,40); //right hand
ellipse(200,107,-19,10);//nose
line(209,116,188,115);//mouth
ellipse(213,87,11,10);//right eye
ellipse(188,87,11,10);//left eye
fill(124, 201, 106);
rect(-1,239,400,161);//floor
fill(242, 232, 89);
ellipse(31,32,50,50);
fill(118, 209, 102);
strokeWeight(5); stroke (132, 240, 168);
line(109,43,112,239);
line(82,127,84,237);
A code is what we use for drawing for example rect, we use it to draw a rectangle. There are some codes that are useless, we only une it to remind us what does code do, for example //floor, it is only for remind us that this rect was for drawing the floor.
Another concept is the dubble point (;) it is to ''confirm'' that you want to draw for example the sun. When you already finished to write the codification between the ( ), if you dont write the ;, your drawing will not appear. it is like something nesessary.
About your earned energy points, they are to make your learning a bit more fun. In your porfile will apear all your projects and lessons, also will appear the number of earned points in all your time within Kahn Academy.
This is a video tutorial about what is Kahn Academy:

No comments:
Post a Comment