1
00:00:00,750 --> 00:00:05,010
Hey there! Welcome to Day 10 of a 100 Days of Code

2
00:00:05,430 --> 00:00:08,560
and today we're gonna learn about functions with

3
00:00:08,630 --> 00:00:10,850
outputs. Previously

4
00:00:10,880 --> 00:00:15,770
we've already seen the other two flavors of functions; a plain function and

5
00:00:15,800 --> 00:00:19,850
also functions with inputs. But in today's lessons,

6
00:00:19,880 --> 00:00:22,400
we're going to be using the skills that we've learned

7
00:00:22,730 --> 00:00:26,180
and we're going to be extending our knowledge of functions to build a

8
00:00:26,210 --> 00:00:30,920
calculator app. I think at some point in every program has lives

9
00:00:30,950 --> 00:00:33,230
they will have built a calculator app.

10
00:00:33,440 --> 00:00:37,070
So if that hasn't already happened to you, then today is your lucky day,

11
00:00:37,130 --> 00:00:39,740
because that's exactly what we're going to be making.

12
00:00:40,310 --> 00:00:43,580
So it's a simple text base calculator,

13
00:00:43,820 --> 00:00:48,820
and we can start off by writing a number and then picking one of the operations:

14
00:00:48,860 --> 00:00:53,420
plus, minus, multiply or divide. So I'm going to divide this by two,

15
00:00:53,870 --> 00:00:58,370
and then it shows us the full calculation, 5 / 2 = 2.5.

16
00:00:58,820 --> 00:01:02,810
And now we can continue calculating with the answer from the previous step,

17
00:01:02,990 --> 00:01:07,190
or we can type 'n' to start a new calculation. Let me type a 'y'

18
00:01:07,310 --> 00:01:12,200
and maybe I'll do 2.5 + 6 

19
00:01:13,010 --> 00:01:16,970
and now I get 8.5. By the end of the lessons today,

20
00:01:17,000 --> 00:01:20,180
you'll have understood how functions really work,

21
00:01:20,300 --> 00:01:25,300
how you can use them to reduce redundant code and how you can provide inputs to

22
00:01:26,210 --> 00:01:31,210
functions as well as providing outputs. Once you're ready, head over to the next

23
00:01:31,820 --> 00:01:33,680
lesson and let's get started.

