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. 

No comments:

Post a Comment