Getting started with Raptor

Introduction to Programming Input, Process, Output
8 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€65.44
List Price:  €93.49
You save:  €28.05
£56.04
List Price:  £80.06
You save:  £24.02
CA$95.74
List Price:  CA$136.79
You save:  CA$41.04
A$107.11
List Price:  A$153.03
You save:  A$45.91
S$95.36
List Price:  S$136.24
You save:  S$40.87
HK$547.90
List Price:  HK$782.75
You save:  HK$234.85
CHF 64.03
List Price:  CHF 91.47
You save:  CHF 27.44
NOK kr772.60
List Price:  NOK kr1,103.76
You save:  NOK kr331.16
DKK kr487.88
List Price:  DKK kr697.01
You save:  DKK kr209.12
NZ$117.84
List Price:  NZ$168.36
You save:  NZ$50.51
د.إ257.06
List Price:  د.إ367.25
You save:  د.إ110.18
৳7,700.43
List Price:  ৳11,001.09
You save:  ৳3,300.65
₹5,837.33
List Price:  ₹8,339.41
You save:  ₹2,502.07
RM333.81
List Price:  RM476.90
You save:  RM143.08
₦92,489.99
List Price:  ₦132,134.22
You save:  ₦39,644.23
₨19,474.37
List Price:  ₨27,821.72
You save:  ₨8,347.35
฿2,588.61
List Price:  ฿3,698.17
You save:  ฿1,109.56
₺2,275.23
List Price:  ₺3,250.47
You save:  ₺975.23
B$358.08
List Price:  B$511.57
You save:  B$153.48
R1,312.98
List Price:  R1,875.77
You save:  R562.78
Лв127.91
List Price:  Лв182.73
You save:  Лв54.82
₩96,452.39
List Price:  ₩137,795.03
You save:  ₩41,342.64
₪267.73
List Price:  ₪382.49
You save:  ₪114.75
₱4,034.64
List Price:  ₱5,764.02
You save:  ₱1,729.38
¥11,065.06
List Price:  ¥15,807.91
You save:  ¥4,742.85
MX$1,201.03
List Price:  MX$1,715.83
You save:  MX$514.80
QR255.05
List Price:  QR364.38
You save:  QR109.32
P965.79
List Price:  P1,379.76
You save:  P413.97
KSh9,296.24
List Price:  KSh13,280.92
You save:  KSh3,984.67
E£3,349.82
List Price:  E£4,785.67
You save:  E£1,435.84
ብር3,985.10
List Price:  ብር5,693.24
You save:  ብር1,708.14
Kz58,375.85
List Price:  Kz83,397.65
You save:  Kz25,021.80
CLP$66,375.71
List Price:  CLP$94,826.51
You save:  CLP$28,450.80
CN¥507.11
List Price:  CN¥724.48
You save:  CN¥217.36
RD$4,113.13
List Price:  RD$5,876.15
You save:  RD$1,763.02
DA9,392.53
List Price:  DA13,418.47
You save:  DA4,025.94
FJ$158.35
List Price:  FJ$226.22
You save:  FJ$67.87
Q544.06
List Price:  Q777.27
You save:  Q233.20
GY$14,678.83
List Price:  GY$20,970.66
You save:  GY$6,291.82
ISK kr9,837.79
List Price:  ISK kr14,054.59
You save:  ISK kr4,216.80
DH708.72
List Price:  DH1,012.51
You save:  DH303.78
L1,246.75
List Price:  L1,781.16
You save:  L534.40
ден4,025.16
List Price:  ден5,750.48
You save:  ден1,725.31
MOP$565.76
List Price:  MOP$808.27
You save:  MOP$242.50
N$1,340.22
List Price:  N$1,914.68
You save:  N$574.46
C$2,582.07
List Price:  C$3,688.83
You save:  C$1,106.76
रु9,353.99
List Price:  रु13,363.42
You save:  रु4,009.42
S/263.57
List Price:  S/376.55
You save:  S/112.97
K270.82
List Price:  K386.91
You save:  K116.08
SAR262.50
List Price:  SAR375.01
You save:  SAR112.51
ZK1,859.31
List Price:  ZK2,656.27
You save:  ZK796.96
L325.94
List Price:  L465.65
You save:  L139.71
Kč1,644.39
List Price:  Kč2,349.23
You save:  Kč704.84
Ft25,720.62
List Price:  Ft36,745.32
You save:  Ft11,024.70
SEK kr762.14
List Price:  SEK kr1,088.81
You save:  SEK kr326.67
ARS$61,174.36
List Price:  ARS$87,395.69
You save:  ARS$26,221.33
Bs486.59
List Price:  Bs695.16
You save:  Bs208.56
COP$277,528.94
List Price:  COP$396,486.91
You save:  COP$118,957.97
₡35,172.98
List Price:  ₡50,249.28
You save:  ₡15,076.29
L1,732.56
List Price:  L2,475.19
You save:  L742.63
₲520,857.74
List Price:  ₲744,114.38
You save:  ₲223,256.64
$U2,703.34
List Price:  $U3,862.08
You save:  $U1,158.74
zł282.38
List Price:  zł403.41
You save:  zł121.03
Already have an account? Log In

Transcript

Welcome to Lesson eight. And in this lesson we're going to learn a little bit about rafter. rafter is a fantastic program when it comes to learning how to use the flowcharts minimizes the amount of syntax that you have to learn just to you know, learn the logic itself and how it's supposed to go. I love that it's a visual because we can practice and we can write it down all day long. But not only does this give us this visual, but it also tests that for us so that we can see if everything is working properly. It's designed to to be really easy to use, it'll give you error messages.

So if you know you're kind of having some problems and stuff, there is one error message does not catch, catch that I'll show you a little bit later but I just it should catch it so it's something that I want to point out okay. When you open wrapper, it starts up like this, you have the start and then you have the end and that's what the ovals are for is The Beginning and the End. These different shapes mean different things. This square is for an assignment statement and an assignment statement. Basically what you're doing is you're saying, I want a program to do this command. So that's what you're doing in an assignment statement.

This little box right here, if you jump down to this one is input and output. So I could ask a user to give me some input, or I could read a file to get some input. For output. I could display it to screen or I could save it to a file or maybe print it to your printer, for example. The next one I want to talk about is the selection and these are the loops. We haven't discussed loops or selections yet in our program.

I just want to point out that they are there at this point. And this is a call and we haven't played with that yet either. But I do want to point out that those are those are there. And then you can use those and practice with those. So basically a call is if you create a method, for example, and we haven't really talked about methods, so think of a method as a function that can operate on its own, you can create it. And then instead of having to write the whole part of that program later on, you can just kind of call it later.

So if we wanted to do that, we would use this in order to call that method. And then loops are for whenever you want to do something over and over again, but you don't want to write the code for every single time that it's going to go through. So you're going to have some sort of value, that when it checks the condition, it will say, yes, this is true. So I'm going to continue to run these statements and then maybe when it's false, it'll kick it out of that loop and then move on. We're going to talk more about loops later. But right now I just want to get you started in Python, or in Raptor.

So we can have some mistakes. And this is one of the things that Raptor really helps you to do is to catch some of those mistakes. So if I grab this assignment and I drag it down here says what to do, just grab the assignment and drag it down. There's two ways to open it, you can either double click it, or you can right click it and click Edit. And sometimes it gets it's a pain, turn, double click, so I like to right click and click at it. And the nice cool thing about this too is it'll say enter an assignment and it gives you examples.

So it'll say, you know, set coins to five, here's your set, set count to count plus one set board, blah, blah, blah, and then there's your two. So you put your set amount in here and you put your two amount in here. Remember when we mentioned variables holding a value, that's exactly what we're doing here. We're creating a variable and we're hoping to put a value in it. Right now I'm going to show you how you're going to get an error if you do it incorrectly. So if I say I'm going to set x, and I'm going to set x equal to y, that should generate an error because so far in our program, when I move this out here, y doesn't have a value at all.

And you can't use a variable unless it has been given a value. So you can see that it's automatically in red, as soon as I do it before I even start to run the program. But I'm going to run the program and you can see when it gets to this box, it will say variable y not found because we can't use the variable wireless, we give it a value and you say, wait a minute, we gave it the value x but No, we didn't. We gave x the value of y and y doesn't have it a very value. Okay? So we need to change that that will not Work.

Here's another one. Maybe we're going to use a variable miles and we want to set that variable to 100. So that every hundred miles something happens. Okay? That's all set that will run. No problem.

However, I'm going to add another assignment statement. And this assignment statement, I'm gonna misspell my variable. This is misspelled because originally when I wrote my URL, I put the s on it and here I don't have the s on it. If you use capitalization, you have to use capitalization when you use that same variable later. You always have to spell it the same You can see it has a red box around it, it's not gonna like it. When I play it, it gives me an error and it says variable mile not found.

So how I would fix that is I would edit ad DS. And now runs perfectly. And you can see over here on this other square box master console, it says run complete, four symbols evaluated. Now, the other error that I was talking about, actually, the older version of Python would catch it and this one does not. I'm not sure why. But I want to show you that this is still very wrong to do.

We have miles is equal to 100. That is a number. And when we learn types in our programming, you're going to learn earned that a number is different than a string. And there are different types of numbers as well. And you, you get to use the same type, or you have to convert the types. Here, if I change miles and I make it equal to distance to town, and when I have a string value, I have to put that in quotes.

It doesn't like it, you can see that there's going to be an issue with it. But for some reason, it will still run in here. So there it does. The problem with this is because we already put a value of 100 miles and miles is supposed to be maybe an int value for example. You cannot convert an int to a stream, it cannot be done in this particular manner. Okay.

So that's important to point out i think is something that you definitely, definitely should know. So that is just a very, very quick covering of rat tour and what it can do, I will be adding more lessons on Raptor. So yay. But remember, we're gonna go back to lecture now because we're trying to learn all the base knowledge about programming in general. So I will see you in the next lesson.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.