Difference between revisions of "KTurtle/C3/Question-Glues/English-timed"
From Script | Spoken-Tutorial
Sandhya.np14 (Talk | contribs) |
|||
Line 4: | Line 4: | ||
|- | |- | ||
||00:01 | ||00:01 | ||
− | ||Hello | + | ||Hello and welcome to the '''spoken tutorial''' on '''Question Glues''' in '''KTurtle'''. |
|- | |- | ||
||00:08 | ||00:08 | ||
− | ||In this tutorial, we will learn the following question glues '''and, not''' | + | ||In this tutorial, we will learn the following question glues '''and, not'''. |
|- | |- | ||
|| 00:16 | || 00:16 | ||
− | ||To record this tutorial I am using | + | ||To record this tutorial, I am using: |
+ | * '''Ubuntu Linux OS''' version '''12.04''' | ||
+ | * '''KTurtle''' version '''0.8.1 beta'''. | ||
|- | |- | ||
||00:29 | ||00:29 | ||
− | ||We assume that you have basic working knowledge of KTurtle and “if-else” statement in KTurtle | + | ||We assume that you have basic working knowledge of '''KTurtle''' and '''“if-else”''' statement in KTurtle. |
|- | |- | ||
||00:39 | ||00:39 | ||
− | ||If not, for relevant tutorials, please visit our website | + | ||If not, for relevant tutorials, please visit our website: |
+ | http://spoken-tutorial.org | ||
|- | |- | ||
||00:46 | ||00:46 | ||
− | ||Before proceeding, let me explain about question glue words. | + | ||Before proceeding, let me explain about '''question glue''' words. |
|- | |- | ||
||00:51 | ||00:51 | ||
− | ||Question glue words enable us to glue small questions into one big question. | + | ||'Question glue' words enable us to glue small questions into one big question. |
|- | |- | ||
||01:00 | ||01:00 | ||
− | ||“and”, “or” and “not” are some glue-words.Glue-words are used together with '''if-else''' conditions. | + | ||“and”, “or” and “not” are some glue-words. Glue-words are used together with '''if-else''' conditions. |
|- | |- | ||
||01:11 | ||01:11 | ||
− | ||Let's open a new''' KTurtle''' Application. | + | ||Let's open a new''' KTurtle''' '''Application'''. |
|- | |- | ||
||01:15 | ||01:15 | ||
Line 38: | Line 41: | ||
|- | |- | ||
||01:18 | ||01:18 | ||
− | ||In the Search bar, type KTurtle. | + | ||In the Search bar, type: "KTurtle". |
|- | |- | ||
||01:22 | ||01:22 | ||
− | ||And | + | ||And click on the option. |
|- | |- | ||
||01:24 | ||01:24 | ||
− | ||Let's begin the tutorial with | + | ||Let's begin the tutorial with glue word '''and'''. |
|- | |- | ||
||01:28 | ||01:28 | ||
− | ||I already have a program in a text editor. | + | ||I already have a program in a '''text editor'''. |
|- | |- | ||
||01:33 | ||01:33 | ||
Line 69: | Line 72: | ||
|- | |- | ||
||01:56 | ||01:56 | ||
− | ||Let's look the code. | + | ||Let's look at the code. |
|- | |- | ||
||01:59 | ||01:59 | ||
Line 83: | Line 86: | ||
|- | |- | ||
||02:14 | ||02:14 | ||
− | ||It shows a pop-up dialog box containing text from the string and also generates a beep for non null strings. | + | ||It shows a pop-up dialog box containing text from the '''string''' and also generates a beep for non null-strings. |
|- | |- | ||
||02:24 | ||02:24 | ||
Line 99: | Line 102: | ||
|- | |- | ||
|| 02:55 | || 02:55 | ||
− | ||'''if(($a !=$b) and ($b != $c) and ($c != $a))'' checks the ''if'' condition. | + | ||'''if(($a != $b) and ($b != $c) and ($c != $a))'' checks the ''if'' condition. |
|- | |- | ||
||03:05 | ||03:05 | ||
− | ||when ''''if'''' condition above is true, control moves into '''nested if''' block. | + | ||when ''''if'''' condition above is '''true''', control moves into '''nested if''' block. |
|- | |- | ||
Line 109: | Line 112: | ||
|- | |- | ||
||03:17 | ||03:17 | ||
− | ||'''fontsize 18''' sets the font size used by '''print''' command. | + | ||'''fontsize 18''' sets the font-size used by '''print''' command. |
|- | |- | ||
||03:22 | ||03:22 | ||
Line 115: | Line 118: | ||
|- | |- | ||
||03:35 | ||03:35 | ||
− | ||'''print''' command displays the string after checking the if condition. | + | ||'''print''' command displays the '''string''' after checking the ''''if'''' condition. |
|- | |- | ||
||03:41 | ||03:41 | ||
− | ||'''else''' command checks '''else''' condition | + | ||''''else'''' command checks '''else''' condition when if condition in the block is '''false'''. |
|- | |- | ||
||03:48 | ||03:48 | ||
− | ||'''print''' command displays the string after checking the '''else''' condition. | + | ||''''print'''' command displays the string after checking the '''else''' condition. |
|- | |- | ||
||03:54 | ||03:54 | ||
− | ||'''else''' command checks the final condition. | + | ||''''else'''' command checks the final condition. |
|- | |- | ||
||03:57 | ||03:57 | ||
− | ||Here '''else''' is checked only when above conditions are false. | + | ||Here '''else''' is checked only when above conditions are '''false'''. |
|- | |- | ||
||04:03 | ||04:03 | ||
− | ||'''print''' command displays the string after checking the else condition. I will run the code to check all the conditions. | + | ||'''print''' command displays the '''string''' after checking the 'else' condition. I will run the code to check all the conditions. |
|- | |- | ||
||04:12 | ||04:12 | ||
− | ||Let's click on the ''' Run''' button to run the program. | + | ||Let's click on the ''' Run''' button to '''run''' the program. |
|- | |- | ||
||04:15 | ||04:15 | ||
− | ||A message dialog box | + | ||A message '''dialog box''' pops-up. Let me click '''OK'''. |
|- | |- | ||
||04:20 | ||04:20 | ||
− | ||Let's | + | ||Let's enter 5 for 'length of AB' and click '''OK''', |
|- | |- | ||
||04:25 | ||04:25 | ||
− | || 8 for 'length of BC' and click OK | + | || 8 for 'length of BC' and click '''OK''', |
|- | |- | ||
||04:29 | ||04:29 | ||
− | || 9 for 'length of AC' and click OK | + | || 9 for 'length of AC' and click '''OK'''. |
|- | |- | ||
||04:33 | ||04:33 | ||
− | ||'''“A scalene triangle” is displayed on the canvas. | + | ||'''“A scalene triangle”''' is displayed on the canvas. |
|- | |- | ||
||04:37 | ||04:37 | ||
− | || | + | ||Let's '''run''' again. |
|- | |- | ||
||04:40 | ||04:40 | ||
− | ||A message dialog box pops up .Let me click OK. | + | ||A message dialog box pops up. Let me click '''OK'''. |
|- | |- | ||
||04:44 | ||04:44 | ||
− | || | + | ||Let's enter 5 for length of 'AB' and click '''OK''', 6 for length of 'BC' and click '''OK''', 6 for length of 'AC' and click '''OK'''. |
|- | |- | ||
Line 167: | Line 170: | ||
|- | |- | ||
||05:02 | ||05:02 | ||
− | ||Let's run again to check default condition. | + | ||Let's '''run''' again to check default condition. |
|- | |- | ||
||05:06 | ||05:06 | ||
− | ||A message dialog box pops up. Let me click | + | ||A message dialog box pops up. Let me click '''OK'''. |
|- | |- | ||
||05:11 | ||05:11 | ||
− | ||Let's | + | ||Let's enter 1 for length of 'AB' and click '''OK''', |
|- | |- | ||
||05:16 | ||05:16 | ||
− | ||1 for length of 'BC' and click OK | + | ||1 for length of 'BC' and click '''OK''', |
|- | |- | ||
||05:20 | ||05:20 | ||
− | ||2 for length of 'AC' and click OK. | + | ||2 for length of 'AC' and click '''OK'''. |
|- | |- | ||
Line 190: | Line 193: | ||
|- | |- | ||
||05:30 | ||05:30 | ||
− | ||Let's now clear this program. Let me type '''clear''' command and run '''clear''' command cleans the canvas . | + | ||Let's now clear this program. Let me type '''clear''' command and '''run'''. '''clear''' command cleans the canvas. |
|- | |- | ||
|| 05:40 | || 05:40 | ||
− | || | + | || Let's next work with '''"not"'' condition. |
|- | |- | ||
||05:43 | ||05:43 | ||
Line 225: | Line 228: | ||
|- | |- | ||
||06:36 | ||06:36 | ||
− | ||e.g. If the given condition is true, not makes it false. | + | ||e.g. If the given condition is '''true''', "not" makes it '''false'''. |
|- | |- | ||
||06:42 | ||06:42 | ||
− | || | + | ||and when the condition is '''false''', the output will be '''true'''. |
|- | |- | ||
||06:48 | ||06:48 | ||
− | ||'''print''' command displays the string after checking the '''if not''' condition. | + | ||'''print''' command displays the '''string''' after checking the '''if not''' condition. |
|- | |- | ||
||06:55 | ||06:55 | ||
− | ||'''else''' command is executed when '''if''' condition is false. | + | ||'''else''' command is executed when '''if''' condition is '''false'''. |
|- | |- | ||
||07:01 | ||07:01 | ||
− | ||'''print''' command displays the string after checking the '''else''' condition. | + | ||'''print''' command displays the '''string''' after checking the '''else''' condition. |
|- | |- | ||
||07:07 | ||07:07 | ||
− | ||'''go 100,100''' commands ''' Turtle''' to go 100 pixels from left of canvas and 100 pixels from top of canvas | + | ||'''go 100,100''' commands ''' Turtle''' to go 100 pixels from left of canvas and 100 pixels from top of canvas. |
|- | |- | ||
||07:20 | ||07:20 | ||
− | ||'''repeat 3{turnright 120 forward 100}''' commands turtle to | + | ||'''repeat 3{turnright 120 forward 100}''' commands turtle to draw an equilateral triangle on the canvas. |
|- | |- | ||
||07:32 | ||07:32 | ||
− | ||Let me run the program to check all the conditions. | + | ||Let me '''run''' the program to check all the conditions. |
|- | |- | ||
||07:36 | ||07:36 | ||
− | ||Press F5 key to run the code. | + | ||Press '''F5''' key to '''run''' the code. |
|- | |- | ||
|| 07:40 | || 07:40 | ||
− | ||Enter 6 for length of AB and click OK | + | ||Enter 6 for length of AB and click '''OK'''. |
|- | |- | ||
||07:45 | ||07:45 | ||
− | ||Enter 5 for length of BC and click OK | + | ||Enter 5 for length of BC and click '''OK'''. |
|- | |- | ||
||07:48 | ||07:48 | ||
− | ||Enter 7 for length of AC and click OK | + | ||Enter 7 for length of AC and click '''OK'''. |
|- | |- | ||
Line 271: | Line 274: | ||
|- | |- | ||
||07:58 | ||07:58 | ||
− | ||Let's run again. Let's enter 5 for length of AB and click | + | ||Let's '''run''' again. Let's enter 5 for length of AB and click '''OK''', |
|- | |- | ||
||08:05 | ||08:05 | ||
− | ||5 for length of BC and click | + | ||5 for length of BC and click '''OK''', |
|- | |- | ||
||08:09 | ||08:09 | ||
− | ||5 for length of AC and click OK | + | ||5 for length of AC and click '''OK'''. |
|- | |- | ||
Line 290: | Line 293: | ||
|- | |- | ||
||08:25 | ||08:25 | ||
− | ||Let's summarize | + | ||Let's summarize. |
|- | |- | ||
||08:28 | ||08:28 | ||
− | ||In this tutorial we have learnt | + | ||In this tutorial, we have learnt the '''question glues- "and", "not"'''. |
|- | |- | ||
||08:35 | ||08:35 | ||
− | ||As an assignment, I would like you to write program to determine | + | ||As an assignment, I would like you to write program to determine- |
|- | |- | ||
||08:40 | ||08:40 | ||
− | ||Angle concept for right angled triangle using question glue '''“or”''' | + | ||* Angle concept for right angled triangle using question glue '''“or”''' |
|- | |- | ||
||08:48 | ||08:48 | ||
− | ||Structure of ''if or | + | ||* Structure of ''if or'' condition is: |
|- | |- | ||
||08:51 | ||08:51 | ||
− | ||if within brackets '''condition''' '''or''' within brackets '''condition''' '''or''' within brackets '''condition.''' | + | ||'''if''' within brackets '''condition''' '''or''' within brackets '''condition''' '''or''' within brackets '''condition.''' |
|- | |- | ||
||08:59 | ||08:59 | ||
− | ||Within curly brackets | + | ||Within curly brackets ''do something'' |
|- | |- | ||
||09:02 | ||09:02 | ||
− | ||'''else''' within curly brackets | + | ||'''else''' within curly brackets ''do something''. |
|- | |- | ||
||09:06 | ||09:06 | ||
− | ||Watch the video available at this | + | ||Watch the video available at this URL: |
+ | http://spoken-tutorial.org/What_is_a_Spoken-Tutorial | ||
|- | |- | ||
||09:10 | ||09:10 | ||
− | ||It | + | ||It summarizes the Spoken Tutorial project. |
|- | |- | ||
||09:13 | ||09:13 | ||
− | ||If you do not have good bandwidth, you can download and watch it | + | ||If you do not have good bandwidth, you can download and watch it. |
|- | |- | ||
||09:18 | ||09:18 | ||
− | ||The Spoken Tutorial Project | + | ||The Spoken Tutorial Project team : |
|- | |- | ||
||09:20 | ||09:20 | ||
− | ||Conducts workshops using spoken tutorials | + | ||* Conducts workshops using spoken tutorials. |
|- | |- | ||
||09:23 | ||09:23 | ||
− | ||Gives certificates to those who pass an online test | + | ||* Gives certificates to those who pass an online test. |
|- | |- | ||
||09:27 | ||09:27 | ||
− | ||For more details, please write to contact@spoken-tutorial.org | + | ||For more details, please write to: |
+ | contact@spoken-tutorial.org | ||
|- | |- | ||
||09:34 | ||09:34 | ||
− | ||Spoken Tutorial | + | ||'''Spoken Tutorial''' project is a part of the '''Talk to a Teacher''' project. |
|- | |- | ||
||09:38 | ||09:38 | ||
− | ||It is supported by the National Mission on Education through ICT, MHRD, Government of India | + | ||It is supported by the National Mission on Education through ICT, MHRD, Government of India. |
|- | |- | ||
||09:44 | ||09:44 | ||
− | ||More information on this | + | ||More information on this mission is available at this link: |
+ | http://spoken-tutorial.org/NMEICT-Intro | ||
|- | |- | ||
||09:49 | ||09:49 | ||
− | ||This is Madhuri Ganpathi from IIT Bombay signing off. | + | ||This is Madhuri Ganpathi from '''IIT Bombay''', signing off. |
− | + | Thank you for joining. | |
− | Thank you for joining | + | |
|- | |- |
Revision as of 18:11, 18 September 2015
Time | Narration |
00:01 | Hello and welcome to the spoken tutorial on Question Glues in KTurtle. |
00:08 | In this tutorial, we will learn the following question glues and, not. |
00:16 | To record this tutorial, I am using:
|
00:29 | We assume that you have basic working knowledge of KTurtle and “if-else” statement in KTurtle. |
00:39 | If not, for relevant tutorials, please visit our website: |
00:46 | Before proceeding, let me explain about question glue words. |
00:51 | 'Question glue' words enable us to glue small questions into one big question. |
01:00 | “and”, “or” and “not” are some glue-words. Glue-words are used together with if-else conditions. |
01:11 | Let's open a new KTurtle Application. |
01:15 | Click on Dash home. |
01:18 | In the Search bar, type: "KTurtle". |
01:22 | And click on the option. |
01:24 | Let's begin the tutorial with glue word and. |
01:28 | I already have a program in a text editor. |
01:33 | Let me copy the code from the text editor and paste it into KTurtle editor. |
01:40 | Please pause the tutorial here and type the program into your KTurtle editor. |
01:46 | Resume the tutorial after typing the program. |
01:50 | Let me zoom into the program text. |
01:52 | It may possibly be a little blurred. |
01:56 | Let's look at the code. |
01:59 | reset command sets Turtle to its default position. |
02:04 | Message in a program is given within double quotes after the keyword message " " . |
02:10 | “message” command takes “string” as input. |
02:14 | It shows a pop-up dialog box containing text from the string and also generates a beep for non null-strings. |
02:24 | $a, $b and $c are variables that store user input. |
02:30 | “ask” command prompts for user input to be stored in variables. |
02:36 | if(($a+$b>$c) and ($b+$c>$a) and ($c+$a>$b), checks the “if” condition. |
02:49 | When the two questions glued with “and” are true, result is true. |
02:55 | 'if(($a != $b) and ($b != $c) and ($c != $a)) checks the if condition. |
03:05 | when 'if' condition above is true, control moves into nested if block. |
03:12 | It checks whether sides of triangle are unequal. |
03:17 | fontsize 18 sets the font-size used by print command. |
03:22 | go 10,100 commands Turtle to go 10 pixels from left of canvas and 100 pixels from top of canvas. |
03:35 | print command displays the string after checking the 'if' condition. |
03:41 | 'else' command checks else condition when if condition in the block is false. |
03:48 | 'print' command displays the string after checking the else condition. |
03:54 | 'else' command checks the final condition. |
03:57 | Here else is checked only when above conditions are false. |
04:03 | print command displays the string after checking the 'else' condition. I will run the code to check all the conditions. |
04:12 | Let's click on the Run button to run the program. |
04:15 | A message dialog box pops-up. Let me click OK. |
04:20 | Let's enter 5 for 'length of AB' and click OK, |
04:25 | 8 for 'length of BC' and click OK, |
04:29 | 9 for 'length of AC' and click OK. |
04:33 | “A scalene triangle” is displayed on the canvas. |
04:37 | Let's run again. |
04:40 | A message dialog box pops up. Let me click OK. |
04:44 | Let's enter 5 for length of 'AB' and click OK, 6 for length of 'BC' and click OK, 6 for length of 'AC' and click OK. |
04:58 | “ Not a scalene triangle” is displayed on the canvas. |
05:02 | Let's run again to check default condition. |
05:06 | A message dialog box pops up. Let me click OK. |
05:11 | Let's enter 1 for length of 'AB' and click OK, |
05:16 | 1 for length of 'BC' and click OK, |
05:20 | 2 for length of 'AC' and click OK. |
05:24 | " Does not satisfy triangle's inequality " is displayed on the canvas. |
05:30 | Let's now clear this program. Let me type clear command and run. clear command cleans the canvas. |
05:40 | Let's next work with '"not" condition. |
05:43 | Let me copy the program from the text editor and paste it into KTurtle editor. |
05:51 | Please pause the tutorial here and type the program into your KTurtle editor. |
05:56 | Resume the tutorial after typing the program. |
06:01 | Let me zoom into the program text and explain the program. |
06:05 | reset command sets Turtle to default position. |
06:09 | $a, $b and $c are variables that store user input. |
06:15 | if not (($a==$b) and ($b==$c) and ($c==$a))checks the if not condition. |
06:27 | not is a special question glue-word. It inverses the logical state of its operand. |
06:36 | e.g. If the given condition is true, "not" makes it false. |
06:42 | and when the condition is false, the output will be true. |
06:48 | print command displays the string after checking the if not condition. |
06:55 | else command is executed when if condition is false. |
07:01 | print command displays the string after checking the else condition. |
07:07 | go 100,100 commands Turtle to go 100 pixels from left of canvas and 100 pixels from top of canvas. |
07:20 | repeat 3{turnright 120 forward 100} commands turtle to draw an equilateral triangle on the canvas. |
07:32 | Let me run the program to check all the conditions. |
07:36 | Press F5 key to run the code. |
07:40 | Enter 6 for length of AB and click OK. |
07:45 | Enter 5 for length of BC and click OK. |
07:48 | Enter 7 for length of AC and click OK. |
07:54 | “Triangle is not equilateral” is displayed on the canvas. |
07:58 | Let's run again. Let's enter 5 for length of AB and click OK, |
08:05 | 5 for length of BC and click OK, |
08:09 | 5 for length of AC and click OK. |
08:13 | “Triangle is equilateral” is displayed on the canvas. An equilateral triangle is drawn on the canvas. |
08:21 | With this we come to the end of this tutorial. |
08:25 | Let's summarize. |
08:28 | In this tutorial, we have learnt the question glues- "and", "not". |
08:35 | As an assignment, I would like you to write program to determine- |
08:40 | * Angle concept for right angled triangle using question glue “or” |
08:48 | * Structure of if or condition is: |
08:51 | if within brackets condition or within brackets condition or within brackets condition. |
08:59 | Within curly brackets do something |
09:02 | else within curly brackets do something. |
09:06 | Watch the video available at this URL: |
09:10 | It summarizes the Spoken Tutorial project. |
09:13 | If you do not have good bandwidth, you can download and watch it. |
09:18 | The Spoken Tutorial Project team : |
09:20 | * Conducts workshops using spoken tutorials. |
09:23 | * Gives certificates to those who pass an online test. |
09:27 | For more details, please write to:
contact@spoken-tutorial.org |
09:34 | Spoken Tutorial project is a part of the Talk to a Teacher project. |
09:38 | It is supported by the National Mission on Education through ICT, MHRD, Government of India. |
09:44 | More information on this mission is available at this link: |
09:49 | This is Madhuri Ganpathi from IIT Bombay, signing off.
Thank you for joining. |
Contributors and Content Editors
Devraj, Madhurig, PoojaMoolya, Pratik kamble, Sandhya.np14, Sneha