Thursday, April 30, 2020

forth hour of the ten hours of programming (infotech)

forth hour of the ten hours of programming
so today i was learning animation basics! finally!
an animation is a bunch of drawing all flipping in a sequence to make the objects or pictures move. so the first new command we are learning is the "draw = function( )  { " which makes all lines of code inside run repeatedly. so we put our picture's code into the draw function space and move "var" to the outside on top, that way it always starts there, then add a new command to change the existing var with whatever command we need it to move, example:
var x = 10;
draw -function( ) {
(whatever the code for the picture is)
x = x + 1;
 };
that way we get to replay that function over and over again.
now i have a challenge to do, the exploding sun.
i did forget to put the first var outside the draw function but i got it in the end.  i made the small animation which was just making the sun get bigger.
we also learned a few shortcuts. so instead of writing
 x + x = 2;
we can just write
x + = 2;
and also programmers like to write + 1 a lot so they came up with an easier way of writing that all the time just by writing ++.
then we had another challenge, parting clouds challenge. and i had a bit of trouble at first but i got it in the end. so what i did was just make the clouds go in the opposite direction of the sun which was getting bigger and bigger.
so i spent a lot of time trying ti figure out what i did wrong in the challenge that i didn't have enough time to start of the project so ill do that later and also start on the interactive programs.

Wednesday, April 29, 2020

third hour of the ten hours of programming (infotech)

third hour of the ten hours of programming
so today i was learning variables. we can type out "var" then what we want to represent like "eyesize" we always have to add an equal sign (gets) then the number and we can layer replace already existing numbers in other shapes with "eyesize" and then any number that has that will change to the number you chose for the eyesize!  but the command does have to be at the top because the computer reads from up to down.
i also took the small "test" to check how well i knew the variables. we had 4 questions and i got all 4 of them right on the first try!
right after we had another challenge. which was the bucktooth bunny challenge.
first we had to change the eyesize to big and then we had to change the size of his teeth. i did that easily.
we can also use variables in math expressions.example: var x = 200 and now we can change an existing number to x but we cant to keep all the shapes in the same place based on the original so what we can do for the others is count how far they are from x and type x - 50 or whatever it is based on the picture!
now there is yet another challenge, the funky frog challenge.
so we had to draw the mouth for the frog first and after that we just had to add the eyes. then we where done.
after that we had a review and then we where done!
so next ill be starting on the animation basics! and ill try to add the pictures later as well because i keep forgetting but i do have the screen shots!

second hour of the ten hours of programming (infotech)

second hour of the ten hours of programming
so today i was learning coloring. i learned how to color in the shapes i drew, the outline, the background and how to remove the outlines, and how to make the outline thicker.
so to fill the background we write "background" and then three numbers pop up indicating the RGB colors the first number is how red the color is, the second how green it is and the thud how blue it is. when we color in the background we need to keep the command at the very top of the others so its in the very back. now to color in the shapes we have a new command, the fill command. now the fill command will fill all shapes that come after the command unless we add more of those commands before the other shapes.
to color the outline we have to write the command "stroke" and we can also change the thickness of the outline by writing "strokeweight" and even remove the outline all together with this command "nostroke".
and always set the color before the shape commands.
i also did another challenge where i had to color in the snowman, the ground, the sun and the background.
there is also a documentation for all the commands so we don't have to memorize them all!
if we don't know what the function is of the place holders that we get when we copy and paste the commands we can go back to the documentation and click on it to check the function of it in a lot of detail.
after that we got a project to do which was called: whats for dinner?
so i just drew some fruits like grapes, orange,  and an apple.
so thats all i did for this hour next hour ill be doing the next lesson:variables.

Monday, April 27, 2020

First hour of the ten hours of programming (info tech)

first hour of the ten hours of programming
so i chose to study the drawing and animation for the ten hours of programming because i want to learn how to animate better and for the first hour i looked at the intro to programing and drawing basics.
in the intro to programing it just showed what programming is, and for the drawing basics i learned that when you create new shapes the ones on the lower levels show up at the top of the other shapes. i learned how to create (ellipse, rect, line) circles, ovals, squares, rectangles and lines. i learned that when we are coding them we have to write 4 numbers indicating where we want it and how we want it, the first two numbers control where the shape is the first one being left and right and the second being up and down. and the last two control how wide or thin the shape is.  we code with first choosing which shape we want (ellipse, rect, line) the we add brackets and put the 4 numbers in and after that we have to add this ; mark at the end so it appears on the blank space. we can also add the name or title to the object so we dont forget which one it is on the picture by adding two slashes like this // and then adding the name. i did the challenge to create the snowman with the circles for the body and a rectangle for the background and two lines for the arms. and thats all i did for today ill do more tommorow/