Difference between revisions of "KTurtle/C3/Control-Execution/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
 
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
|'''Time'''
 
|'''Time'''
 
|'''Narration'''
 
|'''Narration'''
 +
 
|-
 
|-
 
|00:01
 
|00:01
||Hello Everybody.
+
|Hello everybody.
  
 
|-
 
|-
 
|00:03
 
|00:03
||Welcome to this tutorial on '''Control Execution''' in '''KTurtle'''
+
|Welcome to this tutorial on '''Control Execution''' in '''KTurtle'''.
 +
 
 
|-
 
|-
||00:10
+
|00:10
||In this tutorial, we will learn  
+
|In this tutorial, we will learn:
  
 
|-
 
|-
 
|00:13
 
|00:13
|| ''''while'''' loop  and
+
|'while' loop  and
  
 
|-
 
|-
 
|00:15
 
|00:15
||''''for'''' loop
+
|'for' loop.
 +
 
 
|-
 
|-
|| 00:17
+
|00:17
||To record this tutorial I am using,Ubuntu Linux OS Version 12.04 KTurtle version 0.8.1 beta.
+
|To record this tutorial, I am using:
 +
'''Ubuntu Linux OS''' Version '''12.04'''
 +
'''KTurtle''' version '''0.8.1 beta'''.
 +
 
 
|-
 
|-
||00:32
+
|00:32
||We assume that you have basic working knowledge of '''Kturtle'''.  
+
|We assume that you have basic working knowledge of '''Kturtle'''.  
  
 
|-
 
|-
 
|00:38
 
|00:38
||If not, for relevant tutorials, please visit our website. http://spoken-tutorial.org
+
|If not, for relevant tutorials, please visit our website: http://spoken-tutorial.org
 +
 
 
|-
 
|-
||00:45
+
|00:45
||Let's open a new '''KTurtle''' Application.
+
|Let's open a new '''KTurtle Application'''.
  
 
|-
 
|-
 
|00:48
 
|00:48
||Click on '''Dash  home'''.  
+
|Click on '''Dash  home'''.  
  
 
|-
 
|-
 
|00:50
 
|00:50
||In the Search bar, type KTurtle.
+
|In the '''Search bar''', type: "kturtle".
  
 
|-
 
|-
 
|00:53
 
|00:53
||Click on the option.KTurtle Application opens.
+
|Click on the option. '''KTurtle Application''' opens.
 +
 
 
|-
 
|-
||00:59
+
|00:59
||Let me first explain about what is control execution.
+
|Let me first explain about what is '''control execution'''.
 +
 
 
|-
 
|-
||01:05
+
|01:05
 
+
|'''Control execution''' is controlling the flow of a program.  
||Control execution is controlling the flow of a program.  
+
  
 
|-
 
|-
 
|01:10
 
|01:10
||Different conditions are used to control program execution.
+
|Different conditions are used to control program execution.
 +
 
 
|-
 
|-
||01:16
+
|01:16
||Loop is a block of code  executed repeatedly till a certain condition is satisfied.
+
|'''Loop''' is a '''block''' of code, executed repeatedly till a certain '''condition''' is satisfied.
 +
 
 
|-
 
|-
 
|01:25
 
|01:25
||Eg. '''“while”''' loop and  '''“for”''' loop
+
|e.g. “while” loop and  “for” loop.
 +
 
 
|-
 
|-
||01:30
+
|01:30
||Let's begin the tutorial with '''“while”''' loop
+
|Let's begin the tutorial with '''“while”''' loop.
 +
 
 
|-
 
|-
||01:34
+
|01:34
||In  the '''“while'''” loop, the code inside the loop repeats till '''boolean''' evaluates to 'false'.
+
|In  the '''“while'''” loop, the code inside the loop repeats till '''Boolean''' evaluates to "false".
 +
 
 
|-
 
|-
||01:42
+
|01:42
||Let me explain the structure of '''“while”''' loop.
+
|Let me explain the structure of '''“while”''' loop:
 +
'''while 'loop condition'''' {
 +
''do something''
 +
'''with loop increment variable
 +
}'''
  
'''while loop condition''' {
+
|-
 +
|01:56
 +
|I already have the code in a text-editor.
  
  '''do something '''
 
 
'''with  loop increment variable
 
}'''
 
 
|-
 
|-
||01:56
+
|01:59
||I already have the code in a text editor.
+
|Let me copy the program from text editor and paste it into '''KTurtle''' editor.
|-
+
||01:59
+
||Let me copy the program from text editor and paste it into '''KTurtle''' editor
+
  
 
|-
 
|-
 
|02:07
 
|02:07
||Please pause the tutorial here and type the program into your '''KTurtle''' editor.
+
|Please pause the tutorial here and type the program into your '''KTurtle''' editor.
 +
 
 
|-
 
|-
 
|02:13
 
|02:13
|Resume the tutorial after typing the program
+
|Resume the tutorial after typing the program.
 +
 
 
|-
 
|-
||02:18
+
|02:18
||Let me zoom into the program text it may possibly be a little blurred.
+
|Let me zoom into the program text, it may possibly be a little blurred.
 +
 
 
|-
 
|-
||02:25
+
|02:25
||Let me explain the code.
+
|Let me explain the code.
 +
 
 
|-
 
|-
||02:27
+
|02:27
||# sign comments a line written after it.  
+
|'#' hyash sign comments a line written after it.  
 +
 
 
|-
 
|-
 
|02:32
 
|02:32
||It means, this line will not be executed while running the program.
+
|It means, this line will not be executed while running the program.
 +
 
 
|-
 
|-
||02:38
+
|02:38
||'''reset''' command sets '''“Turtle'''” to its '''default''' position.
+
|'''reset''' command sets '''“Turtle'''” to its '''default''' position.
 +
 
 
|-
 
|-
||02:43
+
|02:43
||'''$x=0''' initializes the value of variable x to zero.
+
|'''$x=0''' initializes the value of variable 'x' to zero.
 +
 
 
|-
 
|-
||02:52
+
|02:52
||Message in a program is given within double quotes after the '''keyword''' '''message " "''' 
+
|Message in a program is given within double quotes after the keyword  "message". '''“message”''' command takes '''string''' as input.  
'''“message”''' command takes '''“string”''' as input.  
+
 
 
|-
 
|-
 
|03:04
 
|03:04
||It shows a pop-up dialog box containing text from the string.  
+
|It shows a pop-up dialog-box containing text from the '''string'''.  
 +
 
 
|-
 
|-
||03:11
+
|03:11
||'''while $x<30''' checks the '''“while”''' condition.
+
|'''while $x<30''' checks the “while” condition,
 +
 
 
|-
 
|-
||03:17
+
|03:17
||'''$x=$x+3''' increments the value of  variable $x by 3
+
|'''$x=$x+3''' increments the value of  variable $x by 3.
 +
 
 
|-
 
|-
||03:27
+
|03:27
||'''fontsize 15 ''' sets the font size used by '''print''' command.  
+
|'''fontsize 15 ''' sets the font-size used by '''print''' command.  
 +
 
 
|-
 
|-
 
|03:35
 
|03:35
||Fontsize takes number as input, set in pixels.
+
|'''fontsize''' takes number as input, set in pixels.
 +
 
 
|-
 
|-
||03:42
+
|03:42
||'''forward 20''' commands '''“Turtle”''' to move 20 steps forward on the canvas.
+
|'''forward 20''' commands '''Turtle''' to move 20 steps forward on the canvas.
 +
 
 
|-
 
|-
||03:52
+
|03:52
||'''print $x''' displays the value of variable x on the canvas.
+
|'''print $x''' displays the value of variable 'x' on the canvas.
 +
 
 
|-
 
|-
||04:01
+
|04:01
||Let me click on the '''“Run”''' button to run the program.
+
|Let me click on the '''Run''' button to '''run''' the program.
  
 
|-
 
|-
 
|04:05
 
|04:05
||A message dialog box pops up.Let me click OK.
+
|A message dialog-box pops up. Let me click '''OK'''.
 +
 
 
|-
 
|-
||04:11
+
|04:11
||Multiples of 3 from 3 to 30 are displayed on the canvas.  
+
|Multiples of 3, from 3 to 30, are displayed on the canvas.  
 +
 
 
|-
 
|-
 
|04:17
 
|04:17
||'''“Turtle”''' moves 20 steps forward on the canvas.  
+
|'''Turtle''' moves 20 steps forward on the canvas.  
 +
 
 
|-
 
|-
||04:22
+
|04:22
||Let's next work with '''“for”''' loop
+
|Let's next work with “for” loop.
 +
 
 
|-
 
|-
||04:26
+
|04:26
||“for” loop is a counting loop.
+
|“for” loop is a counting loop.
  
 
|-
 
|-
 
|04:29
 
|04:29
||Every time  the code inside '''“for”''' loop is executed,
+
|Every time  the code inside '''for''' loop is executed,
  
 
|-
 
|-
 
|04:34
 
|04:34
||variable value is incremented, till it reaches the end value.
+
|variable value is incremented till it reaches the end value.
 +
 
 
|-
 
|-
||04:41
+
|04:41
||Let me explain the structure of '''“for”''' loop.
+
|Let me explain the structure of “for” loop.
  
 
|-
 
|-
 
|04:46
 
|04:46
||'''for variable = start number to end number { Statement}'''
+
|'''for variable = start number to end number { Statement}'''
 +
 
 
|-
 
|-
||04:55
+
|04:55
||Let me clear the current program.
+
|Let me clear the current program.
  
 
|-
 
|-
 
|04:59
 
|04:59
||Let me type'''clear'''command and run to clean the canvas.
+
|Let me type "clear" command and '''run''' to clean the canvas.
 +
 
 
|-
 
|-
||05:05
+
|05:05
||Let me copy the program from text editor and paste it into KTurtle editor
+
|Let me copy the program from text-editor and paste it into KTurtle editor.
  
 
|-
 
|-
 
|05:14
 
|05:14
||Please pause the tutorial here and type the program into your KTurtle editor.
+
|Please pause the tutorial here and type the program into your KTurtle editor.
  
 
|-
 
|-
 
|05:20
 
|05:20
|| Resume the tutorial after typing the program.
+
|Resume the tutorial after typing the program.
 +
 
 
|-
 
|-
||05:25
+
|05:25
||Let me zoom into the program text it may possibly be a little blurred.
+
|Let me zoom into the program text, it may possibly be a little blurred.
 +
 
 
|-
 
|-
||05:32
+
|05:32
||Let me explain the program.
+
|Let me explain the program.
 +
 
 
|-
 
|-
||05:34
+
|05:34
||# sign comments a line written after it.
+
|'#' hyash sign comments a line written after it.
 +
 
 
|-
 
|-
||05:39
+
|05:39
||'''reset''' command sets '''“Turtle”''' to its '''default''' position.
+
|'''reset''' command sets '''Turtle''' to its '''default''' position.
 +
 
 
|-
 
|-
||05:44
+
|05:44
||'''$r=0''' initializes the value of variable r to zero.
+
|'''$r=0''' initializes the value of variable 'r' to zero.
 +
 
 
|-
 
|-
||05:52
+
|05:52
||'''for $x= 1 to 15''' checks '''“for”''' condition  from 1 to 15.
+
|'''for $x= 1 to 15''' checks “for” condition  from 1 to 15.
 +
 
 
|-
 
|-
||06:01
+
|06:01
||'''$r=$x*($x+1)/2''' calculates the value of variable r.
+
|'''$r=$x*($x+1)/2''' calculates the value of variable 'r'.
 +
 
 
|-
 
|-
||06:12
+
|06:12
||'''fontsize 18''' sets the font size used by '''print''' command.  
+
|'''fontsize 18''' sets the font-size used by '''print''' command.  
 +
 
 
|-
 
|-
||06:19
+
|06:19
||'''print $r''' displays the value of  variable'' r '' on the canvas  
+
|'''print $r''' displays the value of  variable 'r' on the canvas.
 +
 
 
|-
 
|-
||06:26
+
|06:26
||'''forward 15''' commands '''Turtle'''to moves 15 steps forward on the canvas.
+
|'''forward 15''' commands '''Turtle''' to moves 15 steps forward on the canvas.
 +
 
 
|-
 
|-
||06:34
+
|06:34
||'''go 10,250''' commands '''Turtle''' to go 10 pixels from left of canvas and 250 pixels from top of canvas.
+
|'''go 10,250''' commands '''Turtle''' to go 10 pixels from left of canvas and 250 pixels from top of canvas.
 +
 
 
|-
 
|-
||06:48
+
|06:48
||'''“Turtle”''' displays all print commands without any time gap.
+
|“Turtle” displays all print commands without any time gap.
 +
 
 
|-
 
|-
 
|06:54
 
|06:54
||“Wait 2” command makes Turtle to '''“wait”''' for 2 seconds before executing next command.
+
|“Wait 2” command makes Turtle to wait for 2 seconds, before executing next command.
 +
 
 
|-
 
|-
||07:04
+
|07:04
||'''“print”''' command displays the “string” within double quotes and also displays variable $r.
+
|“print” command displays the '''string''' within double quotes and also displays variable '$r'.
 +
 
 
|-
 
|-
||07:13
+
|07:13
||Let me click on the '''“ Run”''' button to run the program.
+
|Let me click on the ''' Run''' button to '''run''' the program.
  
 
|-
 
|-
 
|07:17
 
|07:17
||A series of sum of first 15 natural numbers and  sum of first 15 natural numbers is displayed on the canvas.
+
|A series of sum of first 15 natural numbers and  "Sum of first 15 natural numbers" are displayed on the canvas.
  
 
|-
 
|-
 
|07:27
 
|07:27
||'''Turtle''' moves 15 steps forward on the canvas.
+
|'''Turtle''' moves 15 steps forward on the canvas.
 +
 
 
|-
 
|-
||07:32
+
|07:32
||With this we come to the end of this tutorial.  
+
|With this, we come to the end of this tutorial.  
 +
 
 
|-
 
|-
||07:37
+
|07:37
||Let us summarize.
+
|Let us summarize.
 +
 
 
|-
 
|-
 
|07:40
 
|07:40
||In this tutorial we have learned to use,
+
|In this tutorial, we have learned to use  
  
 
|-
 
|-
 
|07:44
 
|07:44
|| '''“while”''' loop and'' “for” ''' loop
+
|“while” loop and “for” loop.
  
 
|-
 
|-
||07:47
+
|07:47
||As an assignment I would like you to write programs to evaluate
+
|As an assignment, I would like you to write programs to evaluate-
  
 
|-
 
|-
 
|07:54   
 
|07:54   
||Multiples of 2 using “while” loop
+
|Multiples of 2 using “while” loop.
  
 
|-
 
|-
 
|07:58
 
|07:58
||Multiplication table of a number using “for” loop
+
|Multiplication table of a number using “for” loop.
 +
 
 
|-
 
|-
||08:03
+
|08:03
||Watch the video available at  this URLhttp://spoken-tutorial.org/What is a Spoken Tutorial  
+
|Watch the video available at  this URL: http://spoken-tutorial.org/What_is_a_Spoken-Tutorial  
  
 
|-
 
|-
 
|08:08
 
|08:08
||It summarises the Spoken Tutorial project  
+
|It summarizes the Spoken Tutorial project.
  
 
|-
 
|-
 
|08:12
 
|08:12
||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.
 +
 
 
|-
 
|-
 
|08:17
 
|08:17
||The Spoken Tutorial Project Team :
+
|The Spoken Tutorial project team:
  
 
|-
 
|-
 
|08:20
 
|08:20
||Conducts workshops using spoken tutorials  
+
|Conducts workshops using spoken tutorials.
  
 
|-
 
|-
 
|08:23
 
|08:23
||Gives certificates to those who pass an online test  
+
|Gives certificates to those who pass an online test.
  
 
|-
 
|-
 
|08:27
 
|08:27
||For more details, please write to contact@spoken-tutorial.org
+
|For more details, please write to: contact@spoken-tutorial.org
 +
 
 
|-
 
|-
||08:36
+
|08:36
||Spoken Tutorial Project is a part of the Talk to a Teacher project  
+
|'''Spoken Tutorial''' project is a part of the '''Talk to a Teacher''' project.
  
 
|-
 
|-
 
|08:41
 
|08:41
||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.
  
 
|-
 
|-
 
|08:48
 
|08:48
||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  
  
 
|-
 
|-
 
|08:54
 
|08:54
||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.
+
 
|-
 
|-

Latest revision as of 18:06, 24 March 2017

Time Narration
00:01 Hello everybody.
00:03 Welcome to this tutorial on Control Execution in KTurtle.
00:10 In this tutorial, we will learn:
00:13 'while' loop and
00:15 'for' loop.
00:17 To record this tutorial, I am using:

Ubuntu Linux OS Version 12.04 KTurtle version 0.8.1 beta.

00:32 We assume that you have basic working knowledge of Kturtle.
00:38 If not, for relevant tutorials, please visit our website: http://spoken-tutorial.org
00:45 Let's open a new KTurtle Application.
00:48 Click on Dash home.
00:50 In the Search bar, type: "kturtle".
00:53 Click on the option. KTurtle Application opens.
00:59 Let me first explain about what is control execution.
01:05 Control execution is controlling the flow of a program.
01:10 Different conditions are used to control program execution.
01:16 Loop is a block of code, executed repeatedly till a certain condition is satisfied.
01:25 e.g. “while” loop and “for” loop.
01:30 Let's begin the tutorial with “while” loop.
01:34 In the “while” loop, the code inside the loop repeats till Boolean evaluates to "false".
01:42 Let me explain the structure of “while” loop:

while 'loop condition' { do something with loop increment variable }

01:56 I already have the code in a text-editor.
01:59 Let me copy the program from text editor and paste it into KTurtle editor.
02:07 Please pause the tutorial here and type the program into your KTurtle editor.
02:13 Resume the tutorial after typing the program.
02:18 Let me zoom into the program text, it may possibly be a little blurred.
02:25 Let me explain the code.
02:27 '#' hyash sign comments a line written after it.
02:32 It means, this line will not be executed while running the program.
02:38 reset command sets “Turtle” to its default position.
02:43 $x=0 initializes the value of variable 'x' to zero.
02:52 Message in a program is given within double quotes after the keyword "message". “message” command takes string as input.
03:04 It shows a pop-up dialog-box containing text from the string.
03:11 while $x<30 checks the “while” condition,
03:17 $x=$x+3 increments the value of variable $x by 3.
03:27 fontsize 15 sets the font-size used by print command.
03:35 fontsize takes number as input, set in pixels.
03:42 forward 20 commands Turtle to move 20 steps forward on the canvas.
03:52 print $x displays the value of variable 'x' on the canvas.
04:01 Let me click on the Run button to run the program.
04:05 A message dialog-box pops up. Let me click OK.
04:11 Multiples of 3, from 3 to 30, are displayed on the canvas.
04:17 Turtle moves 20 steps forward on the canvas.
04:22 Let's next work with “for” loop.
04:26 “for” loop is a counting loop.
04:29 Every time the code inside for loop is executed,
04:34 variable value is incremented till it reaches the end value.
04:41 Let me explain the structure of “for” loop.
04:46 for variable = start number to end number { Statement}
04:55 Let me clear the current program.
04:59 Let me type "clear" command and run to clean the canvas.
05:05 Let me copy the program from text-editor and paste it into KTurtle editor.
05:14 Please pause the tutorial here and type the program into your KTurtle editor.
05:20 Resume the tutorial after typing the program.
05:25 Let me zoom into the program text, it may possibly be a little blurred.
05:32 Let me explain the program.
05:34 '#' hyash sign comments a line written after it.
05:39 reset command sets Turtle to its default position.
05:44 $r=0 initializes the value of variable 'r' to zero.
05:52 for $x= 1 to 15 checks “for” condition from 1 to 15.
06:01 $r=$x*($x+1)/2 calculates the value of variable 'r'.
06:12 fontsize 18 sets the font-size used by print command.
06:19 print $r displays the value of variable 'r' on the canvas.
06:26 forward 15 commands Turtle to moves 15 steps forward on the canvas.
06:34 go 10,250 commands Turtle to go 10 pixels from left of canvas and 250 pixels from top of canvas.
06:48 “Turtle” displays all print commands without any time gap.
06:54 “Wait 2” command makes Turtle to wait for 2 seconds, before executing next command.
07:04 “print” command displays the string within double quotes and also displays variable '$r'.
07:13 Let me click on the Run button to run the program.
07:17 A series of sum of first 15 natural numbers and "Sum of first 15 natural numbers" are displayed on the canvas.
07:27 Turtle moves 15 steps forward on the canvas.
07:32 With this, we come to the end of this tutorial.
07:37 Let us summarize.
07:40 In this tutorial, we have learned to use
07:44 “while” loop and “for” loop.
07:47 As an assignment, I would like you to write programs to evaluate-
07:54 Multiples of 2 using “while” loop.
07:58 Multiplication table of a number using “for” loop.
08:03 Watch the video available at this URL: http://spoken-tutorial.org/What_is_a_Spoken-Tutorial
08:08 It summarizes the Spoken Tutorial project.
08:12 If you do not have good bandwidth, you can download and watch it.
08:17 The Spoken Tutorial project team:
08:20 Conducts workshops using spoken tutorials.
08:23 Gives certificates to those who pass an online test.
08:27 For more details, please write to: contact@spoken-tutorial.org
08:36 Spoken Tutorial project is a part of the Talk to a Teacher project.
08:41 It is supported by the National Mission on Education through ICT, MHRD, Government of India.
08:48 More information on this mission is available at this link: http://spoken-tutorial.org/NMEICT-Intro
08:54 This is Madhuri Ganpathi from IIT Bombay, signing off. Thank you for joining.

Contributors and Content Editors

PoojaMoolya, Pratik kamble, Sandhya.np14, Sneha