# Programming in Kotlin: Fundamentals

Aug 9 2022 · Kotlin 1.6, Android 12, IntelliJ IDEA CE 2022.1.3

## Part 1: Use Data Types & Operations

### Episode complete

Play next episode

Next

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In the previous set of episodes, you saw how you can work with Boolean values, and how you could use comparison operators such as less than, greater than, equal to and not equal to, to compare values to each other.

``````val passingGrade = 50
``````
``````val studentPassed = studentGrade >= passingGrade
``````
``````println(!samPassed)
``````
``````println(!chrisPassed)
``````
``````println(chrisPassed == false)
``````
``````val catName = "Jaspurr"
``````
``````println(!catName)
``````
``````// val catName = "Jaspurr"
// println(!catName)
``````
``````// AND Operator
// &&
``````
``````val bothPassed = chrisPassed && samPassed
println(bothPassed)
``````

## Demo 2

The OR operator is two vertical lines, or pipes like this:

``````// OR Operator
// ||
``````
``````val eitherPassed = chrisPassed || samPassed
println(eitherPassed)
``````
``````val anyonePassed = chrisPassed || samPassed || studentPassed
println(anyonePassed)
``````
``````val everyonePassed = chrisPassed && samPassed && studentPassed
println(everyonePassed)
``````
``````val meritAwardGrade = 90
``````
``````val samHasPerfectAttendance = true
``````
``````val samIsMeritStudent = samHasPerfectAttendance && samGrade > meritAwardGrade
println(samIsMeritStudent)
``````