Difference between revisions of "KTurtle/C3/Question-Glues/Gujarati"
From Script | Spoken-Tutorial
Jyotisolanki (Talk | contribs) |
Jyotisolanki (Talk | contribs) |
||
Line 4: | Line 4: | ||
|- | |- | ||
||00.01 | ||00.01 | ||
− | || | + | ||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 |
− | + | ||
|- | |- | ||
− | ||00.16 | + | || 00.16 |
− | || | + | ||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 |
|- | |- | ||
||00.39 | ||00.39 | ||
− | || | + | ||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. |
− | + | ||
|- | |- | ||
||00.51 | ||00.51 | ||
− | || | + | ||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. |
− | + | ||
|- | |- | ||
||01.11 | ||01.11 | ||
− | || | + | ||Let's open a new''' KTurtle''' Application. |
− | + | ||
|- | |- | ||
||01.15 | ||01.15 | ||
− | ||'''Dash home''' | + | ||Click on '''Dash home'''. |
|- | |- | ||
||01.18 | ||01.18 | ||
− | || | + | ||In the Search bar, type KTurtle. |
|- | |- | ||
− | ||01.22 | + | ||01.22 |
− | || | + | ||And Click on the option. |
− | . | + | |
|- | |- | ||
||01.24 | ||01.24 | ||
− | || | + | ||Let's begin the tutorial with glue word '''and'''. |
− | + | ||
|- | |- | ||
||01.28 | ||01.28 | ||
− | || | + | ||I already have a program in a text editor. |
− | + | ||
|- | |- | ||
||01.33 | ||01.33 | ||
− | || | + | ||Let me copy the code from the text editor and paste it into '''KTurtle''' editor. |
|- | |- | ||
||01.40 | ||01.40 | ||
− | || | + | ||Please pause the tutorial here and type the program into your '''KTurtle''' editor. |
+ | |||
|- | |- | ||
||01.46 | ||01.46 | ||
− | || | + | ||Resume the tutorial after typing the program. |
− | + | ||
|- | |- | ||
||01.50 | ||01.50 | ||
− | || | + | ||Let me zoom into the program text. |
|- | |- | ||
||01.52 | ||01.52 | ||
− | || | + | ||It may possibly be a little blurred. |
− | + | ||
|- | |- | ||
||01.56 | ||01.56 | ||
− | || | + | ||Let's look the code. |
− | + | ||
|- | |- | ||
||01.59 | ||01.59 | ||
− | ||'''reset''' | + | ||'''reset''' command sets '''Turtle''' to its''' default''' position. |
− | + | ||
|- | |- | ||
||02.04 | ||02.04 | ||
− | || | + | ||Message in a program is given within double quotes after the keyword '''message " " '''. |
|- | |- | ||
||02.10 | ||02.10 | ||
− | ||'''“message”''' | + | ||'''“message”''' command takes '''“string”''' as input. |
|- | |- | ||
||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. |
− | + | ||
|- | |- | ||
||02.24 | ||02.24 | ||
− | ||'''$a | + | ||'''$a, $b''' and '''$c''' are variables that store user input. |
− | + | ||
|- | |- | ||
||02.30 | ||02.30 | ||
− | ||'''“ask”''' | + | ||'''“ask”''' command prompts for user input to be stored in variables. |
− | + | ||
|- | |- | ||
||02.36 | ||02.36 | ||
− | ||'''if(($a+$b>$c) and ($b+$c>$a) and ($c+$a>$b)''', '''“if”''' | + | ||'''if(($a+$b>$c) and ($b+$c>$a) and ($c+$a>$b)''', checks the '''“if”''' condition. |
|- | |- | ||
||02.49 | ||02.49 | ||
− | || | + | ||When the two questions glued with '''“and”''' are true, result is true. |
− | + | ||
|- | |- | ||
− | ||02.55 | + | || 02.55 |
− | || | + | ||'''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. |
|- | |- | ||
||03.12 | ||03.12 | ||
− | || | + | ||It checks whether sides of triangle are unequal. |
− | + | ||
|- | |- | ||
||03.17 | ||03.17 | ||
− | ||'''fontsize 18''' '''print''' | + | ||'''fontsize 18''' sets the font size used by '''print''' command. |
− | + | ||
|- | |- | ||
||03.22 | ||03.22 | ||
− | ||'''go 10,100''' | + | ||'''go 10,100''' commands Turtle to go 10 pixels from left of canvas and 100 pixels from top of canvas. |
− | + | ||
|- | |- | ||
||03.35 | ||03.35 | ||
− | ||'''print''' | + | ||'''print''' command displays the string after checking the if condition. |
− | + | ||
|- | |- | ||
||03.41 | ||03.41 | ||
− | ||'''else''' | + | ||'''else''' command checks '''else''' condition, when if condition in the block is false |
− | + | ||
|- | |- | ||
||03.48 | ||03.48 | ||
− | ||'''print''' | + | ||'''print''' command displays the string after checking the '''else''' condition. |
− | + | ||
|- | |- | ||
||03.54 | ||03.54 | ||
− | ||'''else''' | + | ||'''else''' command checks the final condition. |
− | + | ||
|- | |- | ||
||03.57 | ||03.57 | ||
− | || | + | ||Here'''else''' is checked only when above conditions are false. |
− | + | ||
|- | |- | ||
||04.03 | ||04.03 | ||
− | ||'''print''' | + | ||'''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. |
− | + | ||
|- | |- | ||
||04.15 | ||04.15 | ||
− | || | + | ||A message dialog box pops- up.Let me click OK. |
− | + | ||
|- | |- | ||
||04.20 | ||04.20 | ||
− | ||' | + | ||Let's Enter 5 for 'length of AB' and click OK |
|- | |- | ||
||04.25 | ||04.25 | ||
− | || | + | || 8 for 'length of BC' and click OK |
|- | |- | ||
||04.29 | ||04.29 | ||
− | || | + | || 9 for 'length of AC' and click OK |
|- | |- | ||
||04.33 | ||04.33 | ||
− | || | + | ||'''“A scalene triangle” is displayed on the canvas.''' |
− | + | ||
|- | |- | ||
||04.37 | ||04.37 | ||
− | || | + | ||Lets run again. |
− | + | ||
|- | |- | ||
||04.40 | ||04.40 | ||
− | || | + | ||A message dialog box pops up .Let me click OK. |
− | + | ||
|- | |- | ||
||04.44 | ||04.44 | ||
− | || | + | ||Lets 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 | ||04.58 | ||
− | || | + | ||'''“ Not a scalene triangle”''' is displayed on the canvas. |
− | + | ||
|- | |- | ||
||05.02 | ||05.02 | ||
− | || | + | ||Let's run again to check default condition. |
|- | |- | ||
||05.06 | ||05.06 | ||
− | || | + | ||A message dialog box pops up. Let me click ok. |
− | + | ||
|- | |- | ||
||05.11 | ||05.11 | ||
− | || | + | ||Let's Enter 1 for length of 'AB' and click OK. |
|- | |- | ||
||05.16 | ||05.16 | ||
− | || | + | ||1 for length of 'BC' and click OK. |
|- | |- | ||
||05.20 | ||05.20 | ||
− | || | + | ||2 for length of 'AC' and click OK. |
|- | |- | ||
||05.24 | ||05.24 | ||
− | || | + | ||'''" Does not satisfy triangle's inequality "''' is displayed on the canvas. |
|- | |- | ||
||05.30 | ||05.30 | ||
− | || | + | ||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 | ||
− | || | + | ||Let me copy the program from the text editor and paste it into '''KTurtle''' editor. |
|- | |- | ||
||05.51 | ||05.51 | ||
− | || | + | ||Please pause the tutorial here and type the program into your KTurtle editor. |
|- | |- | ||
||05.56 | ||05.56 | ||
− | || | + | ||Resume the tutorial after typing the program. |
− | + | ||
|- | |- | ||
||06.01 | ||06.01 | ||
− | || | + | ||Let me zoom into the program text and explain the program. |
− | + | ||
|- | |- | ||
||06.05 | ||06.05 | ||
− | ||'''reset''' | + | ||'''reset''' command sets '''Turtle''' to '''default''' position. |
− | + | ||
|- | |- | ||
||06.09 | ||06.09 | ||
− | ||'''$a | + | ||'''$a, $b''' and '''$c''' are variables that store user input. |
− | + | ||
|- | |- | ||
||06.15 | ||06.15 | ||
− | ||'''if not (($a==$b) and ($b==$c) and ($c==$a))''' | + | ||'''if not (($a==$b) and ($b==$c) and ($c==$a))'''checks the ''if not '' condition. |
|- | |- | ||
||06.27 | ||06.27 | ||
− | ||'''not''' | + | ||'''not''' is a special question glue-word. It inverses the logical state of its operand. |
|- | |- | ||
||06.36 | ||06.36 | ||
− | || | + | ||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''' | + | ||'''print''' command displays the string after checking the '''if not''' condition. |
− | + | ||
|- | |- | ||
||06.55 | ||06.55 | ||
− | ||'''else''' | + | ||'''else''' command is executed when '''if''' condition is false. |
− | + | ||
|- | |- | ||
||07.01 | ||07.01 | ||
− | ||'''print''' | + | ||'''print''' command displays the string after checking the '''else''' condition. |
− | + | ||
|- | |- | ||
||07.07 | ||07.07 | ||
− | ||'''go | + | ||'''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}''' | + | ||'''repeat 3{turnright 120 forward 100}''' commands turtle to draws an equilateral triangle on the canvas |
|- | |- | ||
||07.32 | ||07.32 | ||
− | || | + | ||Let me run the program to check all the conditions. |
− | + | ||
|- | |- | ||
||07.36 | ||07.36 | ||
− | || | + | ||Press F5 key to run the code. |
|- | |- | ||
− | ||07.40 | + | || 07.40 |
− | || | + | ||Enter 6 for length of AB and click OK |
|- | |- | ||
||07.45 | ||07.45 | ||
− | || | + | ||Enter 5 for length of BC and click OK |
|- | |- | ||
||07.48 | ||07.48 | ||
− | || | + | ||Enter 7 for length of AC and click OK |
|- | |- | ||
||07.54 | ||07.54 | ||
− | || | + | ||'''“Triangle is not equilateral”''' is displayed on the canvas. |
|- | |- | ||
||07.58 | ||07.58 | ||
− | || | + | ||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 ok. |
|- | |- | ||
||08.09 | ||08.09 | ||
− | || | + | ||5 for length of AC and click OK |
|- | |- | ||
||08.13 | ||08.13 | ||
− | || | + | ||'''“Triangle is equilateral”''' is displayed on the canvas. An equilateral triangle is drawn on the canvas. |
− | + | ||
|- | |- | ||
||08.21 | ||08.21 | ||
− | || | + | ||With this we come to the end of this tutorial. |
|- | |- | ||
||08.25 | ||08.25 | ||
− | || | + | ||Let's summarize |
|- | |- | ||
||08.28 | ||08.28 | ||
− | || | + | ||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 |
|- | |- | ||
||08.40 | ||08.40 | ||
− | || | + | ||Angle concept for right angled triangle using question glue '''“or”''' |
− | + | ||
|- | |- | ||
||08.48 | ||08.48 | ||
− | || | + | ||Structure of ''if or ''condition is: |
|- | |- | ||
||08.51 | ||08.51 | ||
− | ||''' | + | ||if within brackets '''condition''' '''or''' within brackets '''condition''' '''or''' within brackets '''condition.''' |
|- | |- | ||
||08.59 | ||08.59 | ||
− | || | + | ||Within curly brackets '''do something.''' |
|- | |- | ||
||09.02 | ||09.02 | ||
− | ||'''else''' | + | ||'''else''' within curly brackets '''do something.''' |
− | + | ||
|- | |- | ||
||09.06 | ||09.06 | ||
− | || | + | ||Watch the video available at this URLhttp://spoken-tutorial.org/What is a Spoken Tutorial |
|- | |- | ||
||09.10 | ||09.10 | ||
− | || | + | ||It summarises the Spoken Tutorial project |
|- | |- | ||
||09.13 | ||09.13 | ||
− | || | + | ||If you do not have good bandwidth, you can download and watch it |
− | + | ||
|- | |- | ||
||09.18 | ||09.18 | ||
− | || | + | ||The Spoken Tutorial Project Team : |
|- | |- | ||
||09.20 | ||09.20 | ||
− | || | + | ||Conducts workshops using spoken tutorials |
|- | |- | ||
||09.23 | ||09.23 | ||
− | || | + | ||Gives certificates to those who pass an online test |
|- | |- | ||
||09.27 | ||09.27 | ||
− | || | + | ||For more details, please write to contact@spoken-tutorial.org |
− | + | ||
|- | |- | ||
||09.34 | ||09.34 | ||
− | || | + | ||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 |
|- | |- | ||
||09.44 | ||09.44 | ||
− | || | + | ||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. |
− | + | ||
− | + | ||
+ | Thank you for joining | ||
|- | |- |
Revision as of 12:15, 4 July 2013
Visual Cue | 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,Ubuntu Linux OS Version 12.04. KTurtle version 0.8.1 beta. |
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. http://spoken-tutorial.org |
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 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 | Hereelse 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 | Lets run again. |
04.40 | A message dialog box pops up .Let me click OK. |
04.44 | Lets 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 draws 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 URLhttp://spoken-tutorial.org/What is a Spoken Tutorial |
09.10 | It summarises 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 http://spoken-tutorial.org/NMEICT-Intro ] |
09.49 | This is Madhuri Ganpathi from IIT Bombay signing off.
Thank you for joining |