Placeholder Image

字幕列表 影片播放

  • was pop in.

  • Next time, don't hit it that hard.

  • But come on in.

  • Come on in.

  • All right.

  • So today we're gonna do something pretty fun.

  • Welcome to my place again.

  • And, uh, yes.

  • Today I'm not the star of the show.

  • The star of the show today is Matt Show by Cinematographer.

  • So I'm gonna be teaching him how to program.

  • So you guys ready?

  • It's gonna be pretty basic, cause how much?

  • How much do you know?

  • Nothing.

  • Are you sure?

  • Yeah.

  • Not at all.

  • Nothing.

  • But you want to get to Stanford?

  • Yeah, CS.

  • Right.

  • Let's do it.

  • All right.

  • 30 minute session because record for 30 minutes.

  • Let's start.

  • No, I'm gonna I'm gonna read my nose, but pretend you don't see my God.

  • Yeah.

  • So I guess the first question How much programming do you know, or do you even know what is prevent me?

  • Programming is what makes phones.

  • Yeah.

  • Oh, you can tell me about yourself a little bit.

  • A k hold.

  • You are 16.

  • I basically liner yet.

  • Well, idea of Tim.

  • And then now I'm making videos.

  • That's about it.

  • So, yeah, Matt is indeed 16 and he's probably the best cinematographer.

  • No.

  • Which is great, because when you're 16 you're pretty cheap.

  • Not fucking expensive.

  • Yeah, it just doesn't pay anything.

  • Yeah, I just don't pay anything because because he's because he's a gamble.

  • I see the investment potential potential Qattan show.

  • But yeah, it's okay, because I'm gonna sell video courses soon, so he's making money better by them so that I could pay you.

  • All right.

  • The reason why I'm doing this is because I want you to get into Stanford so you could be closer to where I live.

  • So you make more videos?

  • Yeah.

  • Yeah.

  • I don't care if you have a successful career or not.

  • So I guess one thing that I want to talk about is that when people think about programming coating the think about just making websites and so like that, you know, because because whenever I hear about quoting the always sailing Oh, the first thing you learn should be a Chinaman CSS.

  • It's like, Yes, but first of all, those aren't even quoting languages.

  • Did you know that?

  • No.

  • No, actually, you need that.

  • You know, you should.

  • So yeah, so usually think about that.

  • But it's actually not even coating the coding is basically the art of automation.

  • The whole point of courting is what did I say?

  • Delegate tasking machine rather than doing it yourself so they can do it automatically.

  • What?

  • I'll set it right.

  • And how do you do?

  • Tell him to do things you give them very, very precise instructions.

  • And those instructions is basically your code.

  • All right.

  • Sorry, Rachel.

  • Have some fundamentals.

  • Okay.

  • First function we learned that is already made.

  • Like you're not gonna write dysfunction.

  • It's called print.

  • Okay.

  • For example, of Germans dope.

  • Okay.

  • And then what happens when you run this?

  • You get Germans, though, right?

  • So this thing in between print is a string meaning it's words or lead characters.

  • And you could also put numbers.

  • And then this function is smart enough.

  • Toe print, different things, you know, get cold.

  • So try it yourself.

  • Try to print like, Hi, my name is that Yes, that's clearly wrong.

  • I said, Matt Choe, that's wonderful.

  • Okay, you get the point.

  • Let's learn about functions.

  • So let me tell you what functions does.

  • So this is the syntax, reflections like this.

  • How you write death means you started function you could write any name like it's all right, dog.

  • These practices, I'll talk about later.

  • But I'll just add them now and then I could print.

  • Don't go right.

  • And then if I run this, what happens is that it runs the whole file.

  • So now if I run the file, it means this has been recorded.

  • The function has been recorded, so if I run it, it says dog.

  • Oh, so let's do something funky.

  • What do you think would happen if I print?

  • And then I put dog there?

  • What do you think that will happen?

  • It's got a print.

  • This whole thing like Iago would mean, What's gonna just gonna put dog?

  • It's actually gonna print nothing.

  • No, wait, it wasn't predictable.

  • Sorry, my bad.

  • But Okay, So the reason why dog oh got printed is because we called this function.

  • But then why is there none like, for example, if I do dog that Prince Da go?

  • But then if I do print dog, it does nothing.

  • The reason is because this function returns nothing.

  • Basically, this is what what's really happening is returning Nothing.

  • But you can return, like for his nap before you know, print print is actually nothing related to what you're gonna output In terms of your function.

  • This is just like a side effect, right?

  • So imagine if you do I got running and then Okay, So, print dog.

  • So what do you think will happen if I do this?

  • They're gonna print.

  • Don't go.

  • And for this try.

  • Yes, it is.

  • Okay.

  • Cool.

  • So, basically, it returns.

  • You could return stuff.

  • You can also reduce you to return.

  • It means like to imagine.

  • Like Thio after your press.

  • That function, it passes on value so that another function can use it or something else.

  • Yeah.

  • So how do you use these things that you pass on?

  • Good question.

  • You didn't ask me, but good question.

  • Here's what we call it parameters.

  • Right.

  • So in your sponge, Bob would get at parameters.

  • So what Parameters are variables?

  • Kind of.

  • But on functions like, for example, you could say, uh, parameter, Let's just do something easy, like hello?

  • Just to show you that, you know.

  • So what happens is it's at Hello.

  • Let's see what happens.

  • You go then, SpongeBob.

  • Now you get at stuff into it.

  • I was just at a random number five.

  • What do you think it's gonna print is they're gonna add five to the end of Hi.

  • My name is Ben Job.

  • Yes, that's right.

  • You also have to know the operator comparison operators, which is like, for example, so for equals, a big distinction.

  • There's a distinction between, like, the one equal sign and two equal sign.

  • Equal sign is when you want a sign.

  • Something to something to equal Sign is you're comparing, like is four equals four.

  • Yeah.

  • So what do you think will happen if I This much is?

  • Yeah, we'll return.

  • True.

  • Yes.

  • Okay.

  • What if I D'oh five.

  • What do you think this happened?

  • We'll return falls.

  • Yes.

  • Okay.

  • What if I do?

  • For two?

  • What do you think?

  • Those fools.

  • That's true.

  • Do you?

  • So I asked him to write a simple function that requires if statements and operators doesn't school.

  • It's fins.

  • General.

  • Famous gentle.

  • It is negative one.

  • That's good.

  • It's dope.

  • It's dope.

  • Wow.

  • Good job.

  • Good job.

  • Let me whisper to my channel.

  • All right, guys.

  • So I'm actually trying to teach him Rikers in without him knowing it's Ryker Shin.

  • So let's see if you if he gets it right, I'd say probably not.

  • But we'll see.

  • You heard that, Joe?

  • I'm done.

  • Yeah.

  • Did you can't do that, man.

  • It works up T O.

  • Yes, technically, it does work.

  • Yes, but I mean, what if you want to seven right hoops.

  • So yeah.

  • Yeah, it doesn't even return anything.

  • D'oh!

  • All right, OK, it's OK.

  • It's OK.

  • I didn't expect you, Teoh get it?

  • Because, you know, it's really had to think outside the box and stuff like that, but, uh, no worries.

  • This is very creative, actually, like this.

  • So basically, what I want to teach you is Ryker Shin.

  • So it means you could call the function within the function, as in you're gonna call yourself.

  • All right?

  • So I'm not gonna teach you all this because we're actually running out of time, so we're gonna end it here.

  • But I'm just gonna show you real quick what the court looks like.

  • All right, so if you call zero turn.

  • So basically what I did here is I did the two initial number for zero and one and then elsewhere you want to do is you wanna add the previous one and a previous previous one.

  • Right?

  • So all you do is and it's one plus.

  • It's too.

  • And then that's it.

  • Very simple.

  • All right, if you do 56.

  • Interesting.

  • I forgot.

  • And if you put 56 because you're 13 7 21 There you go.

  • There you have it.

  • All right.

  • I hope you enjoyed the small tutorial that would cramp them to 30 minutes.

  • But you did Well, I'm a dealer in law.

  • Things were functions, but variables parameters on, you know, conditions.

  • So that's pretty good.

  • Hopefully next time you'll be able to make a Web app on your own.

  • Yeah.

  • Next tutorial.

  • Yeah.

  • Yeah.

  • So because you don't know, I'm gonna maybe start doing some python courses now, so I don't know how much yet I still have to refine it.

  • And I'm really excited because I think filing it's gonna be something very, very useful for you guys.

  • And also, it can help me pay him is extensive.

  • Yes, because he's quite expensive.

  • And I need to start paying this guy to make videos for me.

  • All right, Cool.

  • So we'll be like this video if you like it.

  • Don't forget to like and subscribe and also pressed the bell.

  • But for notification and also it's Matt Show.

  • So don't forget to follow his channel somewhere.

  • Yeah, don't be that way.

was pop in.

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

A2 初級

16歲的孩子學習如何編寫代碼 (16-Year-Old Learns How To Code)

  • 2 0
    林宜悉 發佈於 2021 年 01 月 14 日
影片單字