1 00:00:00,180 --> 00:00:01,890 in this tutorial we are going to 2 00:00:01,890 --> 00:00:04,827 be learning how to use variables first 3 00:00:04,827 --> 00:00:06,660 we need to go to variables a man 4 00:00:06,660 --> 00:00:08,790 maker variable we're going to call the 5 00:00:08,790 --> 00:00:12,570 variable celsius here you can see the variable 6 00:00:12,630 --> 00:00:14,700 appears on the stage if you want 7 00:00:14,700 --> 00:00:17,580 to remove it then uncheck for 8 00:00:17,580 --> 00:00:19,140 to start we are going to drag 9 00:00:19,290 --> 00:00:20,100 when flag 10 00:00:20,160 --> 00:00:22,650 clicked start the script next we go 11 00:00:22,650 --> 00:00:24,720 back to variables and we're going to 12 00:00:24,720 --> 00:00:27,300 select set celcius to zero to start 13 00:00:27,330 --> 00:00:27,750 off 14 00:00:28,920 --> 00:00:30,780 then go to looks so that we 15 00:00:30,780 --> 00:00:34,050 make the script say something in this 16 00:00:34,050 --> 00:00:36,600 example we want the script to say 17 00:00:37,500 --> 00:00:42,600 hello i am a cool metric cat 18 00:00:44,790 --> 00:00:50,670 i can convert from fahrenheit to celsius 19 00:01:03,870 --> 00:01:06,720 next we want the script to 20 00:01:06,720 --> 00:01:09,750 ask something to go down to sensing 21 00:01:09,870 --> 00:01:12,000 and then choose ask and 22 00:01:12,000 --> 00:01:13,380 and we want to ask 23 00:01:15,000 --> 00:01:19,500 please enter a temperature in fahrenheit 24 00:01:20,940 --> 00:01:23,580 remember when we asked something a dialog 25 00:01:23,610 --> 00:01:25,980 box is going to appear on whatever 26 00:01:25,980 --> 00:01:28,950 the person types in will become the 27 00:01:28,950 --> 00:01:29,550 answer 28 00:01:33,750 --> 00:01:36,540 for the next step we need 29 00:01:36,540 --> 00:01:39,150 to do some calculations to change the 30 00:01:39,150 --> 00:01:41,670 temperature from fahrenheit to celsius you need 31 00:01:41,670 --> 00:01:44,640 to subtract thirty two then multiply by 32 00:01:44,640 --> 00:01:47,490 five over nine so go to operators 33 00:01:47,580 --> 00:01:49,830 and select the subtract and then the 34 00:01:49,830 --> 00:01:50,550 multiply 35 00:01:51,750 --> 00:01:54,300 first we select whatever the answer was 36 00:01:54,750 --> 00:01:56,880 and next we're going to add thirty 37 00:01:56,880 --> 00:02:00,210 two then add this into the next 38 00:02:00,210 --> 00:02:03,570 box and multiply by zero point five 39 00:02:03,570 --> 00:02:05,100 five five five five five a bunch 40 00:02:05,100 --> 00:02:06,870 of fives and six this is the 41 00:02:06,870 --> 00:02:08,310 same as fiver the nine 42 00:02:10,710 --> 00:02:12,360 next we need to go back to 43 00:02:12,360 --> 00:02:16,380 variables and select set celsius to and 44 00:02:16,380 --> 00:02:19,230 i'm going to set celsius to this 45 00:02:19,470 --> 00:02:20,160 equation 46 00:02:21,630 --> 00:02:24,060 finally we want the script to tell 47 00:02:24,060 --> 00:02:26,100 us the answer so we need to 48 00:02:26,100 --> 00:02:27,030 say hello 49 00:02:28,080 --> 00:02:29,610 now we want to say a few 50 00:02:29,610 --> 00:02:31,860 different things so if you go to 51 00:02:31,860 --> 00:02:34,680 operators you can select the box join 52 00:02:35,790 --> 00:02:37,560 here in the first box we can 53 00:02:37,560 --> 00:02:40,980 write ah yes that would be 54 00:02:43,260 --> 00:02:45,150 and then in the next box we 55 00:02:45,150 --> 00:02:47,520 need to put the variable celsius so 56 00:02:47,520 --> 00:02:50,820 go back to variables select celsius and 57 00:02:50,820 --> 00:02:52,020 add it to the box 58 00:02:53,100 --> 00:02:54,960 if we want to add more information 59 00:02:54,960 --> 00:02:57,570 we can use another joined box at 60 00:02:57,570 --> 00:02:59,820 the first box into the second box 61 00:03:00,360 --> 00:03:01,680 and at the end we want to 62 00:03:01,680 --> 00:03:03,780 add degrees celsius 63 00:03:12,000 --> 00:03:14,430 next add this into the say hello 64 00:03:14,700 --> 00:03:17,234 the two seconds we want to change this 65 00:03:17,234 --> 00:03:18,900 so it sounds a little bit longer 66 00:03:19,170 --> 00:03:22,020 and here you can see he asking us 67 00:03:22,020 --> 00:03:24,480 for a temperature i'm gonna say one 68 00:03:24,480 --> 00:03:26,610 hundred and here it tells us the 69 00:03:26,610 --> 00:03:28,110 degrees in celsius