Snap! Tutorial 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to the snap programming tutorial number one in this tutorial I'm going to show you how to get to a website created by UC Berkeley called snap create an account so that you can write and save programs there when you give you an overview of the programming environment and then also show you how to create your first program alright let's get started in your web browser go ahead and type in the following address it's snap SNA P dot Berkeley BER que ele Y dot edu slash ini T and this is developed at the University of California Berkeley it's an programming environment that's intended to be something that you can learn quickly and learn the basics of writing programs ok so here we are this is what this is what it looks like I'm going to give you an overview of the environment here on the left-hand side this is called the palette and in the palettes you'll see there are a bunch of different commands or command blocks next to that next to the palette is what's called the scripting area and basically the way that you're going to be writing your program is by grabbing blocks from the palette dragging them over to the scripting area and since they are blocks they're intended to look like LEGO pieces that snap together and so you just grab these blocks move them over snap together and this creates a series of commands which is called a script so in this case this would be telling an object to move ten steps turn 15 degrees turn another 15 degrees all right the blocks that we were grabbing at first were from the motion section of that palette there are other sections you can click on looks sound pen control sensing operations and variables and I'll be going through some of the specifics of these in this tutorial but mostly in our upcoming tutorials all right one of the just quick thing about scripting area if you don't want the script that you've write you've written or you want to get rid of part of it you can drag it back into the palette and it'll go away its way of deleting it all right over on the far right on the top right you'll see the area that you see there is called the stage this is going to visually display whatever you are telling your program to do the object here is this is actually this arrow is called a turtle why it's called a turtle but that's the the name that the people that wrote this language gave it and the turtle itself or the image itself and the script that you write are connected together and those things together are called a sprite so this is the stage this is this object itself with the code that's controlling it is called a sprite and you can have multiple objects on one stage so you can write multiple scripts multiple lines of code each that controls the different objects or that controls them in a way where they're kind of moving together or relating to each other and that's all happening on the stage and the very the very bottom right here this is called the sprites control their buttons here where you can add new sprites which will create another object that can move around the screen there's also ways of drawing images yourself or importing images so that it doesn't look at like an arrow can look like something else we'll get to that also in in future tutorials okay so with that said let's actually create our first program that's actually going to do something it's not going to be terribly exciting but we'll get started so we're gonna click on the control button on the top left here and we need some way of having our program actually start so I'm gonna grab this yellow block that says when green flag clicked I'm gonna drag it in and this is what's called a hat block in this programming environment it's a way of starting there's a few other ones there's we could have also grabbed the one when space bar or space key is pressed or when I am clicked there's other ways waiting started but this is a very common one all right so when that clicked and then I'm gonna grab some of the motion blocks grab one that says move ten steps we have another move ten steps and have a turn 15 degrees move 10 steps turn 15 degrees just making kind of a line of code here okay so this together all these objects are all these commands together are an example of a script and then to make them actually happen you can actually click on the top of this hat block but like that works but the green flag is what's intended to be clicked and actually if I if I click on this expand button you can see that the stage zoomed in and in this case I can't see the script behind this I can just click on the green flag so let's see what this does I'll click on the green flag open now they happen all really quickly so let's let's go back I'm actually going to put some pauses in here so that we can see some of the intermediate steps so I'm going to go back to control a grab and move it make a space for this and one of the control blocks is wait one second I'm gonna put that back together so it's going to move 10 steps wait one second move 10 steps or is the wait you go wait one second turn 15 degrees wait one second move 10 steps wait one second and also just something to note the move 10 steps button I can click on that oval the white oval and then I can make it move 30 steps here I could make it wait 2 seconds if I wanted I could make it turn you know 90 degrees so so the the white ovals are things that you can type values into and later you can also drag what are called variables into those blocks that are it's a placeholder for a value that might change throughout your program ok so that's that let's see how this program works I could expand it and watch it again on the stage but instead I'm just gonna hit the green button from here and we'll see how it goes so here we go is there moving forward moving forward turning moving forward turning there we go all right so not much happened in this program but you got to see the overall programming environment all the different parts the last thing that I'd like you to do is to show you how to save your program and actually we to do that we need to create an account so go ahead and click on the cloud button on the top left and you're gonna click sign up and then to do this you're gonna enter in a username so you have to think of something my username for example is just my first and last name birthdate asks you just for the month actually the year that you're born and an email address and actually for this to work you need to be able to check your email address they're going to give you your first password and you can enter it back in so I'm not going to show you all those steps but let's say that you did that you would get you then get an email sent to your email address and then you can come back and click login so let's say you've already gone through those steps I'm gonna type in your username again mine is Matthew Randall type in your password and actually I've forgotten my enough to pull up my email real quick here we go there we go and you have the option if you want of it to save your password on this computer I'm gonna do this from now on okay alright it says now connected so I now can save this file if I'd like to do that I'm going to go back up Sartain up to the cloud to the button that looks like a document I'm gonna click Save I'm gonna give this a fought a filename we're gonna call it first project and this is going to be saved to the cloud so it's save it saved on this particular website which i think is the easiest thing to do alright click Save there we go alright thanks for watching the first snap programming tutorial and go ahead and check the YouTube page for more of them
Info
Channel: LindberghHS Shop
Views: 35,975
Rating: 4.7884617 out of 5
Keywords:
Id: xfHJZ2zWpjQ
Channel Id: undefined
Length: 8min 52sec (532 seconds)
Published: Sun Oct 23 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.