about | help | code help+videos | done | prefs |
srp4379@lausd.net 1-logicbasics
Description:Introduction to Logic-1 Problems
Practicing a model / paradigm for completing methods.
Is the input parameter within a certain range of numbers?
isSchoolDayA isSchoolDayB isSchoolDayC schoolDay
between100and500 between500and600 betweenMinus100andPositive100
Is the input parameter in a certain CATEGORY (e.g. season, month)
doesMonthHave30Days monthHas30DaysA monthHas30DaysB monthHas30DaysC
isSummerMonth isWinterMonth isSummerOrWinterMonth isSpringOrFallMonth
Using the MODULUS/REMAINDER operation (%)
isOddNumber isEvenNumberA isEvenNumberB isEvenNumberC
Is a number a factor?
isDivisibleBy3 isDivisibleBy7 isDivisibleBy10 isDivisibleBy5
Using % (MOD) to track Time Intervals
every60Seconds every30Seconds every5Minutes every5Minutes
Using AND (&&); OR (||)
isDivisibleBy3_OR_5 isDivisibleBy2_OR_3 isDivisibleBy3_AND_5 isDivisibleBy2_AND_3
inEitherOf2Ranges inEitherOf2RangesAB inBothRanges inBothRangesAB
Using NOT (!)
isDivisibleBy5andNOTby10
Checking for a remainder
divideBy5remainderIs1 divideBy7remainderIs2
Isolating and Evaluating the Digits of an Integer
lastDigitIsEven lastDigitIsOdd digitIn10sColumnIsEven digitIn100sColumnIsOdd digitIn1000sColumnIsBetween1and5
Authoring docs
Copyright Nick Parlante 2017 - privacy