Difference between revisions of "KTurtle/C3/Common-Errors-in-KTurtle/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{|border =1 !Visual Cue !Narration |- || 00:01 || Welcome to this tutorial on '''Common Errors''' in '''KTurtle.''' |- || 00:07 ||In this tutorial, we will learn about |- || 00:…')
 
Line 3: Line 3:
 
!Narration
 
!Narration
 
|-
 
|-
|| 00:01
+
||00.01
|| Welcome to this tutorial on '''Common Errors''' in '''KTurtle.'''
+
||Hello  and welcome to the spoken tutorial on '''Question Glues''' in '''KTurtle'''.
|-
+
|| 00:07
+
||In this tutorial, we will learn about
+
|-
+
|| 00:10
+
|| '''Syntax errors''' 
+
  
 
|-
 
|-
|| 00:12
+
||00.08
|| '''Runtime errors''' and
+
||In this tutorial, we will learn the following question glues '''and, not'''
 
+
 
|-
 
|-
|| 00:14
+
|| 00.16
|| '''Logical errors'''
+
||To record this tutorial I am using,Ubuntu Linux OS Version 12.04. KTurtle version 0.8.1 beta.
 
|-
 
|-
|| 00:17
+
||00.29
||To record this tutorial I am using,
+
||We assume that you have basic working knowledge of KTurtle and “if-else” statement in KTurtle
  
 
|-
 
|-
||00:20
+
||00.39
|'''Ubuntu''' '''Linux''' OS version 12.04.  
+
||If not, for relevant tutorials, please visit our website. http://spoken-tutorial.org
 
+
 
|-
 
|-
|| 00:25
+
||00.46
|'''KTurtle''' version. 0.8.1 beta.
+
||Before proceeding, let me explain about question glue words.  
 
|-
 
|-
|| 00:31
+
||00.51
||We assume that you have basic working knowledge of '''KTurtle''' 
+
||Question glue words enable us to glue small questions into one big question.
  
 
|-
 
|-
|| 00:36
+
||01.00
|If not, for relevant tutorials, please visit our website.  
+
||“and”, “or” and “not” are some glue-words.Glue-words are used together with '''if-else''' conditions.
 
+
'''http://spoken-tutorial.org'''
+
 
|-
 
|-
|| 00:42
+
||01.11
||Let's first define,  What is an error ?
+
||Let's open a new''' KTurtle''' Application.
 
+
 
|-
 
|-
|| 00:46
+
||01.15
|'''Error''' is a mistake in a program that produces an '''incorrect''' or '''unexpected''' result.
+
||Click on  '''Dash home'''.  
|-
+
||00:55
+
||First I will explain about '''"Types of errors".'''
+
|-
+
|| 01:00
+
|| '''Syntax error''' is a '''violation of grammatical rules''', of a '''programming language'''.
+
  
 
|-
 
|-
|| 01:09
+
||01.18
|'''Compilation''' fails when a program has '''syntax errors'''.
+
||In the Search bar, type KTurtle.
  
 
|-
 
|-
|| 01:15
+
||01.22
|'''Syntax errors''' are easy to find and fix.
+
||And Click on the  option.
 
+
 
|-
 
|-
|| 01:22
+
||01.24
|For Example:  
+
||Let's begin the tutorial with glue word '''and'''.
 
+
 
|-
 
|-
|| 01:23
+
||01.28
|| '''Unmatched parentheses''', '''square  ''' and '''curly braces'''.  
+
||I already have a program in a text editor.  
 
+
 
|-
 
|-
|| 01:29
+
||01.33
|| Use of ''' variable''' that has not been '''declared'''.
+
||Let me copy the code from the text editor and paste it into  '''KTurtle''' editor.  
  
 
|-
 
|-
|| 01:34
+
||01.40
|| Missing '''quotes''' in '''strings.'''
+
||Please pause the tutorial here and type the program into your '''KTurtle''' editor.  
|-
+
|| 01:38
+
||Let's open a new '''KTurtle''' Application.
+
  
|-
 
|| 01:42
 
|Click on  '''Dash  home'''. In the Search bar, type '''KTurtle.'''
 
  
 
|-
 
|-
|| 01:48
+
||01.46
|Click on the  '''KTurtle''' icon.
+
||Resume the tutorial after typing the program.
 
|-
 
|-
||01:51
+
||01.50
||Let's begin the tutorial with some types of''' syntax errors'''.
+
||Let me zoom into the program text.  
|-
+
||01:58
+
||I already have a program in a text editor.  
+
|-
+
|| 02:02
+
||To explain the '''error''' in the program, I will comment part of the code.
+
|-
+
|| 02:09
+
||Here, I will comment the line
+
  
 
|-
 
|-
|| 02:11
+
||01.52
||'''$a=ask within double quotes "enter any number and click Ok"'''
+
||It may possibly be a little blurred.
 
|-
 
|-
||02:19
+
||01.56
||I will use '''hash(#)''' sign to comment the line.
+
||Let's look the code.
 
|-
 
|-
|| 02:23
+
||01.59
||I will copy the program from text editor and paste it into '''Kturtle's''' Editor.
+
||'''reset''' command sets '''Turtle''' to its''' default''' position.
 
+
 
|-
 
|-
|| 02:31
+
||02.04
|Pause the tutorial here and type the program into your '''KTurtle''' editor
+
||Message in a program is given within double quotes after the keyword '''message " " '''.
  
 
|-
 
|-
|| 02:37
+
||02.10
|Resume the tutorial after typing the program.
+
||'''“message”''' command takes '''“string”''' as input.  
|-
+
|| 02:42
+
||Let's click on '''Run''' button to run the program
+
 
+
|-
+
|| 02:47
+
|'''Complier''' shows the following error,
+
 
+
|-
+
|| 02:50
+
|''' variable "$a" was used without first being assigned  to a value.'''
+
|-
+
|| 02:57
+
||Here the error is in line number 4.
+
  
 
|-
 
|-
||03:02
+
||02.14
||This is a '''syntax error'''. It occured, as the variable  'a' was not declared.
+
||It shows a pop-up dialog box containing text from the string and also generates a beep for non null strings.  
 
|-
 
|-
|| 03:10
+
||02.24
||So I will go to line number 2, remove the comment.
+
||'''$a, $b''' and '''$c''' are variables that store user input.
 
|-
 
|-
|| 03:14
+
||02.30
|| I will copy the program from text Editor and paste it into''' KTurtle's editor'''.
+
||'''“ask”''' command prompts for user input to be stored in variables.
 
|-
 
|-
|| 03:23
+
||02.36
||Let's click on '''Run''' button to run the program
+
||'''if(($a+$b>$c) and ($b+$c>$a) and ($c+$a>$b)''', checks the '''“if”''' condition.
  
 
|-
 
|-
|| 03:27
+
||02.49
|Enter '''6''' for '''a''' value and click OK
+
||When the two questions glued with '''“and”''' are true, result is true.
 
+
 
|-
 
|-
|| 03:31
+
|| 02.55 
|Program runs without errors.  
+
||'''if(($a !=$b) and ($b != $c) and ($c != $a))'' checks the ''if'' condition.
 
|-
 
|-
|| 03:35
+
||03.05
||I will clear the current program from '''KTurtle''' editor.
+
||when ''''if'''' condition above is true, control moves into '''nested if''' block.
  
 
|-
 
|-
|| 03:38
+
||03.12
|Type '''clear''' command and '''Run''' to clean the canvas.
+
||It checks whether sides of triangle are unequal.
 
|-
 
|-
||03:43
+
||03.17
|| let's next look at another error.
+
||'''fontsize 18''' sets the font size used by '''print''' command.  
 
|-
 
|-
||03:46
+
||03.22
||I already have a program in a text editor.  
+
||'''go 10,100''' commands  Turtle to go 10 pixels from left of canvas and 100 pixels from top of canvas.
 
|-
 
|-
|| 03:50
+
||03.35
||Here the value of "'''pi'''" is '''predefined''' in KTurtle.
+
||'''print''' command displays the string after checking the if condition.
 
|-
 
|-
|| 03:54
+
||03.41
||Let's delete the "'''$'''" sign in the program.
+
||'''else''' command checks '''else''' condition, when if condition in the block is false
 
|-
 
|-
|| 03:58
+
||03.48
||I will copy the program from text editor and paste it into ''' Kturtle's Editor'''
+
||'''print''' command displays the string after checking the '''else''' condition.
 
+
|-
+
|| 04:05
+
|Pause the tutorial here and type the program into  your  '''KTurtle editor'''
+
 
+
 
+
|-
+
|| 04:11
+
|Resume the tutorial after typing the program.
+
|-
+
|| 04:16
+
||Let's Click on '''Run''' button to run the program.  
+
 
+
|-
+
|| 04:19
+
|'''Complier''' shows the following error,
+
 
+
 
|-
 
|-
|| 04:22
+
||03.54
|'''you cannot put “=” here'''
+
||'''else''' command checks the final condition.
 
|-
 
|-
|| 04:26
+
||03.57
||This error is in line number 2.  
+
||Here'''else''' is checked only when above conditions are false.
 
|-
 
|-
|| 04:30
+
||04.03
||This is a '''syntax error''' it occured, as there is no '''container  of variable.'''
+
||'''print''' command displays the string after checking the else condition. I will run the code to check all the conditions.  
 
|-
 
|-
|| 04:37
+
||04.12
||Let's go back to the program replace the $ sign.
+
||'''Let's click on the''' Run''' button to run the program.
 
|-
 
|-
|| 04:41
+
||04.15
||I will copy the program from text editor and paste it into '''KTurtle's''' Editor
+
||A message dialog box  pops- up.Let me click OK.
 
|-
 
|-
||04:49
+
||04.20
||let's click on '''Run''' button to run the program.
+
||Let's Enter 5 for 'length of  AB' and click OK
  
 
|-
 
|-
|| 04:53
+
||04.25
|Enter '''45''' for angle value and click '''OK'''
+
|| 8 for 'length of  BC' and click OK
  
 
|-
 
|-
|| 04:57
+
||04.29
|Program runs without errors.
+
|| 9 for 'length of AC' and click OK
|-
+
|| 05:00
+
||Let's remove one of the quotes of the string.
+
|-
+
||05:05
+
|| I will Copy the program from text editor and paste it into '''KTurtle's ''' Editor
+
|-
+
|| 05:12
+
||Click on  '''Run''' button to run the program
+
  
 
|-
 
|-
|| 05:15
+
||04.33
|'''Complier''' shows the following error,
+
||'''“A scalene triangle” is displayed on the canvas.'''
 
+
 
|-
 
|-
|| 05:18
+
||04.37
|'''Text string was not properly closed, expected a double quote “ ” to close the string.'''
+
||Lets run again.
 
|-
 
|-
|| 05:25
+
||04.40
||Here the error is in line number 2.  
+
||A message dialog box pops up .Let me click OK.
 
|-
 
|-
||05:29
+
||04.44
|| I will  go  back to line number 2 and replace the quotes.  
+
||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.
|-
+
||  05:34
+
||I will copy the program from text editor and paste it into''' Kturtle's''' Editor
+
|-
+
|| 05:41
+
||Click on '''Run''' button to run the program
+
  
 
|-
 
|-
|| 05:44
+
||04.58
||Enter '''45''' for angle value and click OK.
+
||'''“ Not a scalene triangle”''' is displayed on the canvas.
 
+
 
|-
 
|-
|| 05:49
+
||05.02
|Program runs without errors.  
+
||Let's run again to check default condition.  
  
 
|-
 
|-
|| 05:52
+
||05.06
|This way you can find the line at which error has occured, and also correct it.  
+
||A message dialog box pops up. Let me click ok.
|-
+
||05:59
+
||Let's now learn about runtime errors.
+
 
|-
 
|-
|| 06:04
+
||05.11
||'''Run-time error''' occurs during the '''execution''' of a program.  
+
||Let's Enter 1 for length of 'AB' and click OK.
  
 
|-
 
|-
|| 06:10
+
||05.16
|It may '''crash''' the program when you run it.  
+
||1 for length of 'BC' and click OK.
  
 
|-
 
|-
|| 06:15
+
||05.20
|'''Runtime errors''' are commonly due to wrong input from the user.  
+
||2 for length of  'AC' and click OK.
  
 
|-
 
|-
|| 06:23
+
||05.24
|'''Compiler''' cannnot find these '''errors'''.
+
||'''" Does not satisfy triangle's inequality "''' is displayed on the canvas.
  
 
|-
 
|-
|| 06:27
+
||05.30
|For example:
+
||Let's now clear this program. Let me type '''clear''' command and run '''clear''' command cleans the canvas .
|-
+
|| 06:29
+
|Trying to divide by a '''variable''' that contains no value.
+
  
 
|-
 
|-
|| 06:3
+
||   05.40
| Run a loop without a '''terminating condition''' or '''increment value'''.
+
|| let's next work with  '''not'' condition.
 
|-
 
|-
||06:43
+
||05.43
||I will clear the current program from the editor.
+
||Let me copy the program from the text editor and paste it into  '''KTurtle''' editor.  
  
 
|-
 
|-
|| 06:47
+
||05.51
|Type '''clear''' command and '''Run''' to clean the canvas.
+
||Please pause the tutorial here and type the program into your KTurtle editor.  
|-
+
|| 06:52
+
||I already have a program in a text editor.  
+
  
 
|-
 
|-
|| 06:56
+
||05.56
|This program '''divides''' two numbers.
+
||Resume the tutorial after typing  the program.
 
+
 
|-
 
|-
|| 07:00
+
||06.01
|'a' is''' dividend''' and 'r' is '''divisor'''.  
+
||Let me zoom into the program text and explain the program.
 
|-
 
|-
||07:04 
+
||06.05
||I will copy the program from text editor and paste it into '''KTurtle's''' Editor.  
+
||'''reset''' command sets '''Turtle''' to '''default''' position.
 
+
 
|-
 
|-
|| 07:11
+
||06.09
|Pause the tutorial and type the program into your '''KTurtle''' editor
+
||'''$a, $b''' and '''$c''' are variables that  store user input.
 
+
 
|-
 
|-
|| 07:16
+
||06.15
|Resume the tutorial after typing the program.  
+
||'''if not (($a==$b) and ($b==$c) and ($c==$a))'''checks the ''if not '' condition.
|-
+
|| 07:20
+
||Let us click on  '''Run''' button to run the program.  
+
  
 
|-
 
|-
|| 07:24
+
||06.27
|let's enter '''5''' for 'a' and click OK
+
||'''not''' is a special question glue-word. It inverses the logical state of its operand.
  
 
|-
 
|-
|| 07:29
+
||06.36
|enter '''0''' for 'r' and click OK
+
||e.g. If the given condition is true, not makes it false.
  
 
|-
 
|-
|| 07:33
+
||06.42
|Here we get a ''' runtime error''' ,
+
||And when the condition is false the output will be true.
 
+
 
|-
 
|-
|| 07:36
+
||06.48
|'''you tried to divide by zero'''
+
||'''print''' command displays the string after checking the '''if not''' condition.
 
|-
 
|-
|| 07:39
+
||06.55
||This error is in line number 4.
+
||'''else''' command is executed when '''if''' condition is false.
 
|-
 
|-
|| 07:43
+
||07.01
||This error occurs as we cannot '''divide''' a number with''' zero'''.
+
||'''print''' command displays the string after checking the '''else''' condition.
 
|-
 
|-
|| 07:49
+
||07.07
||Let us run  again.
+
||'''go 100,100''' commands ''' Turtle''' to go 100 pixels from left of canvas and 100 pixels from top of canvas
 
+
 
|-
 
|-
|| 07:51
+
||07.20
|Enter '''5''' for '''a''' and click OK
+
||'''repeat 3{turnright 120 forward 100}''' commands turtle to draws an equilateral triangle on the canvas
  
 
|-
 
|-
|| 07:54
+
||07.32
|enter '''2''' for 'r' and click OK
+
||Let me run the program to check all the conditions.
 
+
 
|-
 
|-
|| 07:58
+
||07.36
|Program without errors.
+
||Press F5 key to run the code.
|-
+
|| 08:01
+
||I will clear the current program from '''KTurtle''' editor.
+
  
 
|-
 
|-
|| 08:05
+
|| 07.40
|Type '''clear''' command and '''Run''' to clean the canvas.
+
||Enter  6 for length of AB and click OK
|-
+
||08:10
+
||Next we will learn about ''' logical errors'''.
+
|-
+
|| 08:14
+
||'''Logical error''' is a mistake in a program's '''source code''' that results in '''incorrect''' or '''unexpected''' behavior.
+
  
 
|-
 
|-
|| 08:26
+
||07.45
|For example,
+
||Enter 5  for length of  BC  and click OK
  
 
|-
 
|-
|| 08:28
+
||07.48
|'''Assigning''' a value to the wrong variable.
+
||Enter 7  for length of AC and click OK
  
 
|-
 
|-
|| 08:32
+
||07.54
|'''Multiplying''' two numbers instead of '''adding'''.
+
||'''“Triangle is not equilateral”''' is displayed on the canvas.
|-
+
||08:36
+
||I already have a program in a text editor.
+
|-
+
||  08:39
+
||I will copy the program from text editor and paste it into '''Kturtle's''' Editor
+
  
 
|-
 
|-
|| 08:47
+
||07.58
|Pause the tutorial here and type the program into your '''KTurtle''' editor
+
||Let's run again. Let's enter 5 for length of AB and click ok.
  
 
|-
 
|-
|| 08:52
+
||08.05
|Resume the tutorial after typing the program.  
+
||5 for length of BC and click ok.
|-
+
|| 08:57
+
||Now click on the '''Run''' button to run the program.  
+
  
 
|-
 
|-
|| 09:01
+
||08.09
||A dialog box pops-up, let's click OK.
+
||5 for length of AC and click OK
  
 
|-
 
|-
|| 09:05
+
||08.13
||Loop goes into an '''infinite loop'''.  
+
||'''“Triangle is equilateral”''' is displayed on the canvas. An equilateral triangle is drawn on the canvas.
 
|-
 
|-
|| 09:08
+
||08.21
||We see that '''“while”''' loop prints numbers from 31 and  is still printing.
+
||With this we come to the end of this tutorial.
  
 
|-
 
|-
|| 09:15
+
||08.25
||This is a '''logical error'''.
+
||Let's summarize
  
 
|-
 
|-
|| 09:18
+
||08.28
||In the “while” condition x is greater than 20,
+
||In this tutorial we have learnt, the question glues and  not
 
+
 
|-
 
|-
|| 09:23
+
||08.35
||but the '''variable''' x is always greater than 20
+
||As an assignment, I would like you to write program to determine
  
 
|-
 
|-
|| 09:28
+
||08.40
||So, the loop never '''terminates.'''
+
||Angle concept for  right angled triangle using question glue '''“or”'''
|-
+
|| 09:31
+
||I will click on '''Abort''' button to abort the process.
+
 
|-
 
|-
|| 09:36
+
||08.48
||Let's change $x=$x+1 to $x=$x-1.
+
||Structure of ''if or  ''condition is:
 +
 
 
|-
 
|-
||09:44
+
||08.51
|| I will copy the program from text editor and paste it into '''KTurtle's''' editor.
+
||if within brackets '''condition''' '''or''' within brackets '''condition''' '''or''' within brackets '''condition.'''
|-
+
|| 09:51
+
||Let's click on '''Run''' button to run the program.  
+
  
 
|-
 
|-
|| 09:55
+
||08.59
||A dialog box pop-up. Let us click OK.
+
||Within curly brackets '''do something.'''
  
 
|-
 
|-
|| 09:59
+
||09.02
||Loop '''terminates''' after printing the values from''' 29 to 20.'''  
+
||'''else''' within curly brackets '''do something.'''
 
|-
 
|-
||10:05
+
||09.06
||With this we  come to the end of this tutorial.
+
||Watch the video available at this URLhttp://spoken-tutorial.org/What is a Spoken Tutorial
  
 
|-
 
|-
|| 10:10
+
||09.10
||Let us summarise.
+
||It summarises the Spoken Tutorial project
|-
+
|| 10:12
+
||In this tutorial we have learnt, errors and types of errors such as
+
  
 
|-
 
|-
|| 10:18
+
||09.13
| Use of '''variable''' that has not been declared.
+
||If you do not have good bandwidth, you can download and watch it
 +
|-
 +
||09.18
 +
||The Spoken Tutorial Project Team :
  
 
|-
 
|-
|| 10:23
+
||09.20
|Missing '''quotes''' in strings.
+
||Conducts workshops using spoken tutorials
  
 
|-
 
|-
|| 10:27
+
||09.23
|''' Runtime errors''' and
+
||Gives certificates to those who pass an online test
  
 
|-
 
|-
|| 10:30
+
||09.27
|| '''Logical errors'''
+
||For more details, please write to contact@spoken-tutorial.org
 
|-
 
|-
|| 10:3
+
||09.34
||As an assignment I would like you to find errors in the given programs
+
||Spoken Tutorial Project is a part of the Talk to a Teacher project.
   
+
|-
+
||10:46
+
||Watch the video available at this URl: http://spoken-tutorial.org/What is a Spoken Tutorial
+
|-
+
|| 10:50
+
|It summarises the Spoken Tutorial project  
+
|-
+
|| 10:54
+
|If you do not have good bandwidth, you can download and watch it
+
|-
+
||10:59
+
||The Spoken Tutorial Project Team :
+
  
 
|-
 
|-
|| 11:01
+
||09.38
|Conducts workshops using spoken tutorials
+
||It is supported by the National Mission on Education through ICT, MHRD, Government of India
|-
+
|| 11:05
+
|Gives certificates to those who pass an online test
+
|-
+
|| 11:09
+
|For more details, please write to contact@spoken-tutorial.org
+
|-
+
|| 11: 17
+
||Spoken Tutorial Project is a part  of the Talk to a Teacher project
+
  
 
|-
 
|-
|| 11:23
+
||09.44
|It is supported by the National Mission on Education through ICT, MHRD, Government of India
+
+
|-
+
||11:31
+
 
||More information on this Mission is available at this link http://spoken-tutorial.org/NMEICT-Intro ]
 
||More information on this Mission is available at this link http://spoken-tutorial.org/NMEICT-Intro ]
  
 
|-
 
|-
||11:37
+
||09.49
||This is Madhuri Ganpathi from IIT Bombay.Signing off
+
||This is Madhuri Ganpathi from IIT Bombay signing off.  
|-
+
 
||11:41
+
||Thank you  for joining
+
|-
+
|-
+
||
+
|This is Madhuri Ganpathi from IIT Bombay signing off.
+
 
Thank you  for joining
 
Thank you  for joining
 
|-
 
|-

Revision as of 13:28, 29 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