Programming ConceptsLesson 14Free preview
Operators
This lesson is part of Intro to Programming · All levels
Summary
This lesson categorizes operators in programming: arithmetic to calculate, comparison to compare values, logic to combine conditions, and assignment to store results. The operator returns a value that can be directly used in an expression or condition if. Understanding the priorities of the operator is essential to ensure that the results of the calculations are as expected.
Key points
- Arithmetic operators: +, -, *, /, and % (modulus)
- Comparison operator: ==,!=, >, <, >=, <= which produces a boolean
- Logic operator: and, or, not to combine the conditions
- The operator priority determines the order of evaluation of the expression
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.