From the course: Programming for Non-Programmers: Android & Kotlin

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Build a mini calculator app

Challenge: Build a mini calculator app

From the course: Programming for Non-Programmers: Android & Kotlin

Start my 1-month free trial

Challenge: Build a mini calculator app

(light music) - [Instructor] And now it's time for a challenge that combines much of what you've learned throughout the course. Before we get into the challenge, let's review all of the programming concepts we talked about in this chapter. We talked about four of them, conditional statements, arrays, loops, and when statements. So there is a lot to review. Conditional statements are if/then statements where a condition is evaluated as true or false and then a block of code is executed depending on the result. Arrays are lists of items where each item has an associated number called an index. You can use arrays with loops to perform tasks on large numbers of objects. Loops run a block of code multiple times and allow you to perform tasks with less code than simply copying and pasting the same lines over and over again. Using a for loop, you can easily go through the indices of an array. A when statement is similar to an if/then statement in concept, but you use a when statement when…

Contents