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

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{|border =1 !Visual Cue !Narration |- |00.01 ||Hello Everybody. |- |00.03 ||Welcome to this tutorial on '''Control Execution''' in '''KTurtle''' |- ||00.10 ||In this tutorial, …')
 
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{|border =1
 
{|border =1
!Visual Cue
+
|'''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
 +
|Different conditions are used to control program execution.
  
 
|-
 
|-
|01.10
+
|01:16
||Different conditions are used to control program  execution.
+
|'''Loop''' is a '''block''' of code, executed repeatedly till a certain '''condition''' is satisfied.
 +
 
 
|-
 
|-
||01.16
+
|01:25
||Loop is a block of code executed repeatedly till a certain condition is satisfied.
+
|e.g. “while” loop and “for” loop.
 +
 
 
|-
 
|-
|01.25
+
|01:30
||Eg. '''“while”''' loop and  '''“for”''' loop
+
|Let's begin the tutorial with '''“while”''' loop.
 +
 
 
|-
 
|-
||01.30
+
|01:34
||Let's begin the tutorial with '''“while”''' loop
+
|In  the '''“while'''loop, the code inside the loop repeats till '''Boolean''' evaluates to "false".
 +
 
 
|-
 
|-
||01.34
+
|01:42
||In  the '''“while'''loop, the code inside the loop repeats till '''boolean''' evaluates to 'false'.
+
|Let me explain the structure of '''“while”''' loop:
 +
'''while 'loop condition'''' {
 +
''do something''  
 +
'''with loop increment variable
 +
}'''
 +
 
 
|-
 
|-
||01.42
+
|01:56
||Let me explain the structure of '''“while”''' loop.
+
|I already have the code in a text-editor.
  
'''while loop condition''' {
+
|-
 +
|01:59
 +
|Let me copy the program from text editor and paste it into '''KTurtle''' editor.
  
  '''do something '''  
+
|-
 +
|02:07
 +
|Please pause the tutorial here and type the program into your '''KTurtle''' editor.
  
'''with  loop increment variable
 
}'''
 
 
|-
 
|-
||01.56
+
|02:13
||I already have the code in a text editor.
+
|Resume the tutorial after typing the program.
 +
 
 
|-
 
|-
||01.59
+
|02:18
||Let me copy the program from text editor and paste it into '''KTurtle''' editor
+
|Let me zoom into the program text, it may possibly be a little blurred.
  
 
|-
 
|-
|02.07
+
|02:25
||Please pause the tutorial here and type the program into your '''KTurtle''' editor.
+
|Let me explain the code.
 +
 
 
|-
 
|-
|02.13
+
|02:27
|Resume the tutorial after typing the program
+
|'#' hyash sign comments a line written after it.
 +
 
 
|-
 
|-
||02.18
+
|02:32
||Let me zoom into the program text it may possibly be a little blurred.
+
|It means, this line will not be executed while running the program.
 +
 
 
|-
 
|-
||02.25
+
|02:38
||Let me explain the code.
+
|'''reset''' command sets '''“Turtle'''” to its '''default''' position.
 +
 
 
|-
 
|-
||02.27
+
|02:43
||# sign comments a line written after it.  
+
|'''$x=0''' initializes the value of variable 'x' to zero.
 +
 
 
|-
 
|-
|02.32
+
|02:52
||It means, this line will not be executed while running the program.
+
|Message in a program is given within double quotes after the keyword  "message". '''“message”''' command takes '''string''' as input.
 +
 
 
|-
 
|-
||02.38
+
|03:04
||'''reset''' command sets '''“Turtle'''” to its '''default''' position.
+
|It shows a pop-up dialog-box containing text from the '''string'''.  
 +
 
 
|-
 
|-
||02.43
+
|03:11
||'''$x=0''' initializes the value of variable x to zero.
+
|'''while $x<30''' checks the “while” condition,
 +
 
 
|-
 
|-
||02.52
+
|03:17
||Message in a program is given within double quotes after the '''keyword'''  '''message " "'''   
+
|'''$x=$x+3''' increments the value of variable $x by 3.
'''“message”''' command takes '''“string”''' as input.
+
 
 
|-
 
|-
|03.04
+
|03:27
||It shows a pop-up dialog box containing text from the string.  
+
|'''fontsize 15 ''' sets the font-size used by '''print''' command.  
 +
 
 
|-
 
|-
||03.11
+
|03:35
||'''while $x<30''' checks the '''“while”''' condition.  
+
|'''fontsize''' takes number as input, set in pixels.
 +
 
 
|-
 
|-
||03.17
+
|03:42
||'''$x=$x+3''' increments the value of  variable $x by 3
+
|'''forward 20''' commands '''Turtle''' to move 20 steps forward on the canvas.
 +
 
 
|-
 
|-
||03.27
+
|03:52
||'''fontsize 15 ''' sets the font size used by '''print''' command.  
+
|'''print $x''' displays the value of variable 'x' on the canvas.
 +
 
 
|-
 
|-
|03.35
+
|04:01
||Fontsize takes number as input, set in pixels.
+
|Let me click on the '''Run''' button to '''run''' the program.
 +
 
 
|-
 
|-
||03.42
+
|04:05
||'''forward 20''' commands '''“Turtle”''' to move 20 steps forward on the canvas.
+
|A message dialog-box pops up. Let me click '''OK'''.
 +
 
 
|-
 
|-
||03.52
+
|04:11
||'''print $x''' displays the value of variable x on the canvas.
+
|Multiples of 3, from 3 to 30, are displayed on the canvas.  
 +
 
 
|-
 
|-
||04.01
+
|04:17
||Let me click on the '''“Run”''' button to run the program.
+
|'''Turtle''' moves 20 steps forward on the canvas.  
  
 
|-
 
|-
|04.05
+
|04:22
||A message dialog box pops up.Let me click OK.
+
|Let's next work with “for” loop.
 +
 
 
|-
 
|-
||04.11
+
|04:26
||Multiples of 3 from 3 to 30 are displayed on the canvas.  
+
|“for” loop is a counting loop.
 +
 
 
|-
 
|-
|04.17
+
|04:29
||'''“Turtle”''' moves 20 steps forward on the canvas.
+
|Every time  the code inside '''for''' loop is executed,
 +
 
 
|-
 
|-
||04.22
+
|04:34
||Let's next work with '''“for”''' loop
+
|variable value is incremented till it reaches the end value.
 +
 
 
|-
 
|-
||04.26
+
|04:41
||“for” loop is a counting loop.
+
|Let me explain the structure of “for” loop.
  
 
|-
 
|-
|04.29
+
|04:46
||Every time  the code inside '''“for”''' loop is executed,
+
|'''for variable = start number to end number { Statement}'''
  
 
|-
 
|-
|04.34
+
|04:55
||variable value is incremented, till it reaches  the end value.
+
|Let me clear the current program.
 +
 
 
|-
 
|-
||04.41
+
|04:59
||Let me explain the structure of '''“for”''' loop.
+
|Let me type "clear" command and '''run''' to clean the canvas.
  
 
|-
 
|-
|04.46
+
|05:05
||'''for variable = start number to end number  { Statement}'''
+
|Let me copy the program from text-editor and paste it into KTurtle editor.
 +
 
 
|-
 
|-
||04.55
+
|05:14
||Let me clear the current program.
+
|Please pause the tutorial here and type the program into your KTurtle editor.
  
 
|-
 
|-
|04.59
+
|05:20
||Let me type clear command and run to clean the canvas.
+
|Resume the tutorial after typing the program.
 +
 
 
|-
 
|-
||05.05
+
|05:25
||Let me copy the program from text editor and paste it into KTurtle editor
+
|Let me zoom into the program text, it may possibly be a little blurred.
  
 
|-
 
|-
|05.14
+
|05:32
||Please pause the tutorial here and type the program into your KTurtle editor.
+
|Let me explain the program.
  
 
|-
 
|-
|05.20
+
|05:34
|| Resume the tutorial after typing the program.
+
|'#' hyash sign comments a line written after it.
 +
 
 
|-
 
|-
||05.25
+
|05:39
||Let me zoom into the program text it may possibly be a little blurred.
+
|'''reset''' command sets '''Turtle''' to its '''default''' position.
 +
 
 
|-
 
|-
||05.32
+
|05:44
||Let me explain the program.
+
|'''$r=0''' initializes the value of variable 'r' to zero.
 +
 
 
|-
 
|-
||05.34
+
|05:52
||# sign comments a line written after it.
+
|'''for $x= 1 to 15''' checks “for” condition  from 1 to 15.
 +
 
 
|-
 
|-
||05.39
+
|06:01
||'''reset''' command sets '''“Turtle”''' to its '''default''' position.
+
|'''$r=$x*($x+1)/2''' calculates the value of variable 'r'.
 +
 
 
|-
 
|-
||05.44
+
|06:12
||'''$r=0''' initializes the value of variable r to zero.
+
|'''fontsize 18''' sets the font-size used by '''print''' command.  
 +
 
 
|-
 
|-
||05.52
+
|06:19
||'''for $x= 1 to 15''' checks '''“for”''' condition from 1 to 15.
+
|'''print $r''' displays the value of  variable 'ron the canvas.  
 +
 
 
|-
 
|-
||06.01
+
|06:26
||'''$r=$x*($x+1)/2''' calculates the value of variable r.
+
|'''forward 15''' commands '''Turtle''' to moves 15 steps forward on the canvas.
 +
 
 
|-
 
|-
||06.12
+
|06:34
||'''fontsize 18''' sets the font size used by '''print''' command.  
+
|'''go 10,250''' commands '''Turtle''' to go 10 pixels from left of canvas and 250 pixels from top of canvas.
 +
 
 
|-
 
|-
||06.19
+
|06:48
||'''print $r''' displays the value of  variable'' r '' on the canvas
+
|“Turtle” displays all print commands without any time gap.
 +
 
 
|-
 
|-
||06.26
+
|06:54
||'''forward 15''' commands  '''Turtle'''to moves 15 steps forward on the canvas.
+
|“Wait 2” command makes Turtle to wait for 2 seconds, before executing next command.
 +
 
 
|-
 
|-
||06.34
+
|07:04
||'''go 10,250''' commands  '''Turtle''' to go 10 pixels from left of canvas and 250 pixels from top of canvas.
+
|“print” command displays the '''string''' within double quotes and also displays variable '$r'.
 +
 
 
|-
 
|-
||06.48
+
|07:13
||'''“Turtle”''' displays all print commands without any time gap.
+
|Let me click on the ''' Run''' button to '''run''' the program.
 +
 
 
|-
 
|-
|06.54
+
|07:17
||“Wait 2” command makes Turtle to '''“wait”''' for 2 seconds before executing next command.
+
|A series of sum of first 15 natural numbers and  "Sum of first 15 natural numbers" are displayed on the canvas.
 +
 
 
|-
 
|-
||07.04
+
|07:27
||'''“print”''' command displays the “string” within double quotes and also displays variable $r.
+
|'''Turtle''' moves 15 steps forward on the canvas.
 +
 
 
|-
 
|-
||07.13
+
|07:32
||Let me click on the '''“ Run”''' button to run the program.
+
|With this, we come to the end of this tutorial.  
  
 
|-
 
|-
|07.17
+
|07:37
||A series of sum of first 15 natural numbers and  sum of first 15 natural numbers is displayed on the canvas.
+
|Let us summarize.
  
 
|-
 
|-
|07.27
+
|07:40
||'''Turtle''' moves 15 steps forward on the canvas.
+
|In this tutorial, we have learned to use
 +
 
 
|-
 
|-
||07.32
+
|07:44
||With this we come to the end of this tutorial.  
+
|“while” loop and “for”  loop.
|-
+
 
||07.37
+
||Let us summarize.
+
 
|-
 
|-
|07.40
+
|07:47
||In this tutorial we have learned to use,  
+
|As an assignment, I would like you to write programs to evaluate-
  
 
|-
 
|-
|07.44
+
|07:54 
|| '''“while”''' loop and'' “for” ''' loop
+
|Multiples of 2 using “while” loop.
  
 
|-
 
|-
||07.47
+
|07:58
||As an assignment I would like you to write programs to evaluate
+
|Multiplication table of a number using “for” loop.
  
 
|-
 
|-
|07.54 
+
|08:03
||Multiples of 2 using “while” loop
+
|Watch the video available at  this URL: http://spoken-tutorial.org/What_is_a_Spoken-Tutorial
  
 
|-
 
|-
|07.58
+
|08:08
||Multiplication table of a number using “for”  loop
+
|It summarizes the Spoken Tutorial project.
 +
 
 
|-
 
|-
||08.03
+
|08:12
||Watch the video available at  this URLhttp://spoken-tutorial.org/What is a Spoken Tutorial
+
|If you do not have good bandwidth, you can download and watch it.  
  
 
|-
 
|-
|08.08
+
|08:17
||It summarises the Spoken Tutorial project  
+
|The Spoken Tutorial project team:
  
 
|-
 
|-
|08.12
+
|08:20
||If you do not have good bandwidth, you can download and watch it
+
|Conducts workshops using spoken tutorials.  
|-
+
|08.17
+
||The Spoken Tutorial Project Team :
+
  
 
|-
 
|-
|08.20
+
|08:23
||Conducts workshops using spoken tutorials
+
|Gives certificates to those who pass an online test.
  
 
|-
 
|-
|08.23
+
|08:27
||Gives certificates to those who pass an online test
+
|For more details, please write to: contact@spoken-tutorial.org
  
 
|-
 
|-
|08.27
+
|08:36
||For more details, please write to contact@spoken-tutorial.org
+
|'''Spoken Tutorial''' project is a part of the '''Talk to a Teacher''' project.
|-
+
||08.36
+
||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