Tuesday, November 26, 2019

Playgrounds Day 7

Important Vocabulary Pt.2

Algorithm: A step-by-step set of rules or instructions
         
           Example:
                          -If you were to follow an algorithm to create a cake from a box mix, you would                                     follow the 3 to 5 step process written on the back of the box
                         
                          -Ever use Google maps to get from Place A to B?

                          -If you were to get dressed, you would follow a set of memorized instructions to get                             dressed

                          -If you were to go shopping, you would use an algorithm to go to each row and                                     collect groceries.

Pseudocode: An informal description of code or a concept that's intended for human reading

Thursday, November 7, 2019

Playgrounds Day 4

Conditional Code:

What are Conditions?
          A condition is a command that lets you test a result in true or false.

What is Conditional Coding?
          Conditional Coding is a block of code created by a programmer that will run is a set variable is true.

What is a Boolean?
          A Boolean is a value that can only be true or false. The programmer has to set what "True" and "False" will mean for the Boolean.

What is a Logical Operator?
          A logical operator is a symbol or word that connects 2 or more Booleans, which will make more specific conditional decisions.

          I learned lots about logical think as a human vs. a computer. For example, I learned that logical thinking a human is very different, as human will institutionally assume certain things to happen. For example, during our courtyard "Hide and Seek w/ Commands", some people didn't put it in their command to grab the object, a they assumed you would do that. To logical think as a computer, you need to think about what a computer would do, and the most efficient way to do that.

          I would say that it is harder to think as a computer as you have to think of every action. Humans assume and have muscle memory, whereas a computer does not. It is certainly harder to think a computer because I am not used to it, but if I continue coding for a long time, I would eventually get used to it.

Tuesday, November 5, 2019

Important Vocabulary

-Condition:
         Something you test the results in “true” or false. For example, you are handing out flyers the recruit members for the coding club. When you see a student, decide: 
Ex.   
         - True – remind the student of the next meeting 
Is the student a member for the coding club?  
          -False – Give the student a flyer about the coding club 

-Conditional Coding: 
         Conditional coding is a block of code that will run if a variable is true. This can be expressed as an “if-then” statement. It can also include an “else block” which runs if all the conditions in the statement are false. 
Ex. If [person is interested in coding]. Then [invite to coding club], else [do not invite to coding club] 

-Boolean: 
          A value that can only be either true or false. For the conditional statement to run, we have to tell the computer what the possible outcomes are. So in our example, we set the Boolean to be true if “interested in coding” and false if “not interested in coding” 

-Logical Operator: 
          A symbol or word, such as “and”, “or”, or “not” that connects 2 or more Booleans to make conditional decisions more specific. 
-AND (&&) -- The AND operator results in true only if 2 statements are true; otherwise the operator results in false. In coding, the statements are called “operands”. 
-OR (ll) – The NOT operator results in true if one or both operands are true, otherwise the operator results on false. 
-NOT (!) -- The NOT operator results in true id the value is false, and vice versa. It effectively inverts the Value. True becomes false and false becomes true. 

Friday, November 1, 2019

Playgrounds Day 3




1. In the Loop Jumper puzzle, the character made 30 moves, but I only wrote 6 commands, using a loop function

2. You should create a function every time there is a repeatable action that you could condense into a command. You should use loops if there is a function that can be successfully repeated many times. It is a subjective decision whether to use a function or a loop, but it is more efficient to use a function or loop rather than nothing.

3. I would like to create 2 functions; one function to turn around, and a function to walk 2 steps. I would like to create both of these simply because it would make the coding process much quicker.

4. Some everyday "functions" in life are; brushing your teeth, tying shoes and walking. Walking is made up of; moving your legs, changing your center of balance, adjusting your feet for a good foot placement, and many other things. Since we don't have to think about every step, just the "action", this is a function. Almost every action in our life that uses Muscle Memory is a function. Learning to do something would be like writing the commands in the function and then doing it after you have learned it would be like running the function.

5. I have created shortcuts in my life to make things easier often. For example, in my closet, I place my shoes so that the left shoe is on the left, and the right shoe is on the right. I would consider this a function because I do it unconsciously, and it has become automatic.