LinkedIn principal author Doug Winnie explains how logical operators work to create compound and complex conditional tests. Using logical operators like OR and AND, coders and programmers can combine multiple Boolean values, variables, and evaluations to resolve as a single answer. The logical NOT operator reverses an existing Boolean value.
- Simple questions are easy to understand and program,…but life is rarely simple.…When you create conditional tests sometimes you need…to ask multiple questions to get…to the single true or false answer you need to proceed.…In programming you can do exactly that…with logical operators.…If we have a single test,…you will get a single true or false answer.…This can be a literal value, a variable,…an evaluation using equality operators…or a function that returns a boolean value type.…
But if I have two tests, I need to find a way…to get a single true or false answer.…One possible question to ask is if A is true…or if B is true, then it is true.…This uses the or logical operator.…It says that if either of the items are true,…then the whole thing is true.…With two tests there are four possible combinations.…Three of which would evaluate as true,…and one would be false.…The only way this could be false is…if both evaluations were false.…
The other possible question to ask is if A is true and…if B is true, then it is true.…
Join Doug Winnie as he explains the principles of programming and helps you connect to core concepts by exploring three ways that programmers perform their jobs. Doug starts by sharing the history of coding and then dives into functions, values, variables, and parameters used to define actions. He covers capturing input from users, creating conditional tests, using loops with arrays, and object-oriented programming basics. He also takes you beyond programming, into processes like debugging, refactoring, and building iteratively.
- Working with values and variables
- Breaking down tasks
- Customizing functions and parameters
- Building conditional tests
- Creating and changing arrays
- Working with objects and classes
- Debugging and refactoring code
- Going beyond the code as a programmer
Skill Level Beginner
1. Control Computers with Code
2. Define Actions Using Code
3. Repeat Actions and Test for Conditions
4. Objects and OOP
5. Beyond Programming
Debug problems2m 50s
Next steps1m 19s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.