Please enable JavaScript.
Coggle requires JavaScript to display documents.
10Mar Computing Logic (Conditional expressions (x=5 True only when x is…
10Mar Computing Logic
-
-
-
Variables
-
Computer variables:
Named with a letter, word, or phrase
-
-
Naming conventions
-
-
Can contain letters, numbers, underscores
-
Arithmetic and Logic
-
-
When a variable is used, its value is looked up at the time of the calculation
Order of Precedence
When multiple calculations appear in a single expression, there is an order to perform them
Exponentiation, left to right
Multiplication and Division, left to right
Addition and Subtraction, left to right
-
Parentheses, working from inner to outer
Conditional operators, for comparing values
-
= Greater than or equal to
-
-
-
-
Initializing
-
Notes on page 242
Without setting n to 0, it would have no value when DO WHILE n<99 is executed
Once in the loop, user sets value of n with input statement
-
-
-
To study
Chapter Summ (for 7-6)
-
-
-
-
-
-
Special assignments: initialize, count, increment, accumulate
-
Refer to blackboard> session 8> powerpoint for section 7-1> for information on INPUTS, OUTPUTS, LETS, IF-THEN-ELSES, LOOPS
-