{"version":3,"sources":["webpack:///./src/components/programming/Lesson.vue","webpack:///./src/components/programming/Boxes.js","webpack:///src/components/programming/Lesson.vue","webpack:///./src/components/programming/Lesson.vue?a87f","webpack:///./src/components/programming/Lesson.vue?3f1e","webpack:///./src/components/programming/Lesson.vue?67c7"],"names":["ref","attrs","staticClass","_v","_vm","_self","staticStyle","_c","Boxes","box1","brd3","JXG","JSXGraph","initBoard","boundingbox","keepaspectratio","axis","ticks","grid","showCopyright","showNavigation","pan","enabled","options","layer","resize","resizeContainer","containerObj","clientWidth","clientHeight","fullUpdate","window","onresize","create","cssStyle","anchorX","anchorY","fontSize","Math","round","canvasWidth","fixed","x","y","imax","maxlength","xpp","ypp","border","strokeWidth","pt2","withLabel","visible","pt3","pt33","face","name","size","pt4","Value","arr2","strokeColor","arr3","highlight","fillOpacity","shadow","t","pts","X","Y","canvasHeight","color","trace","hideTurtle","i","runXcontrol","fillColor","label","display","offset","runX","moveTo","setTimeout","sailor","res","cs","clearTrace","left","slopeX","setAttribute","slopeY","on","slope1","slope2","parse","movePoint3","movePoint4","unsuspendUpdate","magicGraph","document","querySelector","inputFields","querySelectorAll","onEachPress","event","forEach","field","addEventListener","created","_this","$store","commit","title","newTopics","img","action","goto","newshowhome","newPhys","mounted","MathJax","Hub","Queue","metaInfo","titleTemplate","meta","content","component","staticRenderFns"],"mappings":"0KAA4D,EAAU,W,IAAgBA,EAAI,KAAK,EAAK,EAAI,S,OAA8F,iBAAK,IAAK,MAAsHA,GAAI,qFAAM,IAAK,MAA8LA,GAAI,yGAAI,IAAK,OAA0JA,GAAI,mLAAK,IAAK,KAAmIC,GAAK,GAAC,yI,IAAC,MAAmB,gHAAE,MAAK,CAAOC,iBAAY,K,CAAyB,QAAK,CAAS,8BAAG,MAAM,CAC96B,mBACyC,IAAC,IAAqB,EAAmBC,YAClF,IAAC,OAAY,EAAO,EAAC,MAAI,G,OAAIC,EAAG,IAACC,CAAK,EAAG,4ZAAC,W,IAAiKC,O,EAAa,W,OAA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,KACA,MAIa,aAAAD,E,2CCnBf","file":"js/chunk-55f5c500.9e3438f3.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('h3',{ref:\"ia\"},[_vm._v(\"\\n What is a \"),_c('i',[_vm._v(\"For\")]),_vm._v(\" Loop?\\n \")]),_vm._m(0),_c('h3',{ref:\"st\"},[_vm._v(\"\\n Structure of a \"),_c('i',[_vm._v(\"For\")]),_vm._v(\" Loop\\n \")]),_vm._m(1),_vm._m(2),_vm._m(3),_c('h5',{ref:\"pyt\"},[_vm._v(\"\\n Syntax of a \"),_c('i',[_vm._v(\"for\")]),_vm._v(\" loop in Python3 Programming Language\\n \")]),_c('pre',[_vm._v(\"for i in range(0, 10):\\n print(i)\\n \")]),_c('p'),_c('h5',{ref:\"c\"},[_vm._v(\"\\n Syntax of a \"),_c('i',[_vm._v(\"for\")]),_vm._v(\" loop in \"),_c('i',[_vm._v(\"C\")]),_vm._v(\" Programming Language:\\n \")]),_vm._m(4),_c('h3',{ref:\"pg\"},[_vm._v(\"\\n MagicGraph | \"),_c('i',[_vm._v(\"For\")]),_vm._v(\" Loop Explained\\n \")]),_vm._m(5),_c('v-responsive',[_c('v-layout',{attrs:{\"justify-center\":\"\"}},[_c('div',{staticClass:\"edliy-box-about\",attrs:{\"id\":\"jxgbox1\"}})])],1)],1)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('p',[_vm._v(\"\\n The \"),_c('i',[_vm._v(\"for\")]),_vm._v(\" loop is a common construct in computer programming. A \"),_c('i',[_vm._v(\"for\")]),_vm._v(\" loop is simply used to iterate\\n repeat an action a given number of times. For example, it is a common scenario in computer programming\\n to execute a block of code over and over for multiple times — each time with a different value of the control parameter.\\n \")])\n},function (){var _vm=this,_c=_vm._self._c;return _c('p',[_vm._v(\"\\n A for loop has four essential components: initialization, conditional, incrementation and an action statement.\\n \"),_c('ul',{staticStyle:{\"list-style-type\":\"square\"}},[_c('li',[_c('h5',[_vm._v(\"Initialization \")]),_vm._v(\"\\n This statement is used to declare and/or initialize the loop control variable, e.g., i=0.\\n \")]),_c('li',[_c('h5',[_vm._v(\"Conditional \")]),_vm._v(\"\\n This is a Boolean statement used to evaluate the condition for execution of the body of the loop, e.g., i<=5.\\n \")]),_c('li',[_c('h5',[_vm._v(\"incrementation \")]),_vm._v(\"\\n This statement is used to increment the counter variable, e.g., i++\\n \")]),_c('li',[_c('h5',[_vm._v(\"Action Statement \")]),_vm._v(\"\\n This represents the block of code that is iteratively executed as long as the condition checked remains true.\\n \")])]),_vm._v(\"\\n\\n Shown below is the generic structure of a for loop.\\n \"),_c('br'),_c('br'),_c('pre',[_vm._v(\"for (initialization; conditional; incrementation)\\n{\\naction_statement;\\n}\\nend\\n\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('h3',[_vm._v(\"Example of \"),_c('i',[_vm._v(\"For\")]),_vm._v(\" Loop\")])\n},function (){var _vm=this,_c=_vm._self._c;return _c('p',[_vm._v(\"\\n The syntax used to write the \"),_c('i',[_vm._v(\"for\")]),_vm._v(\" loop varies from language to language. Examples of\\n \"),_c('i',[_vm._v(\"for\")]),_vm._v(\" loops from Python, C and others are given below. The examples print out\\n the numbers 0-9 (inclusive of 0 and 9).\\n \")])\n},function (){var _vm=this,_c=_vm._self._c;return _c('p',[_c('pre',[_vm._v(\"for (int i = 0; i < 10; ++i) {\\n printf(\\\"%d\\\\n\\\", i);\\n}\\n \")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('p',[_vm._v(\"\\n This MagicGraph offers a visually interactive demonstration of how a for loop works.\\n This simple computer program uses the for loop to incrementally move the rabbit from one point to another in \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"N = 10\")]),_vm._v(\" number of steps.\\n \"),_c('ul',{staticStyle:{\"list-style-type\":\"square\"}},[_c('li',[_c('h5',[_vm._v(\"Initialization \")]),_vm._v(\"\\n The loop control variable \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"i\")]),_vm._v(\" is initialized to a value of \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"1\")]),_vm._v(\" (the yellow light is on).\\n \")]),_c('li',[_c('h5',[_vm._v(\"Conditional \")]),_vm._v(\"\\n Boolean statement to evaluate if \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"i\")]),_vm._v(\" is less than or equal to \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"N\")]),_vm._v(\". If it is, the Boolean statement returns \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"True\")]),_vm._v(\" (green light). Otherwise, it returns \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"False\")]),_vm._v(\" (the red light is on).\\n \")]),_c('li',[_c('h5',[_vm._v(\"Incrementation \")]),_vm._v(\"\\n Then, \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"i\")]),_vm._v(\" is updated in increments of \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"1\")]),_vm._v(\" as long as its value is smaller than or equal to \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"N\")]),_vm._v(\" (the default value is 10 but it can be modified).\\n \")]),_c('li',[_c('h5',[_vm._v(\"Action Statement \")]),_vm._v(\"\\n For each increment (while the green light is on), the \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"x\")]),_vm._v(\" and \"),_c('span',{staticStyle:{\"font-family\":\"'Courier New'\"}},[_vm._v(\"y\")]),_vm._v(\" positions of the rabbit are updated by specified increments (defaults are 1 but they can be modified).\\n \")])])])\n}]\n\nexport { render, staticRenderFns }","const Boxes = {\r\n box1: function () {\r\n var brd3 = JXG.JSXGraph.initBoard('jxgbox1',{boundingbox: [-10, 30, 30,-10],keepaspectratio: true, axis:false, ticks:true, grid:true, showCopyright:false, showNavigation:false, pan:{enabled:false}});\r\n //brd3.suspendUpdate();\r\n\t brd3.options.layer['image']=16;\r\n\t var resize = function () {\r\n brd3.resizeContainer(brd3.containerObj.clientWidth, brd3.containerObj.clientHeight, true);\r\n brd3.fullUpdate();\r\n };\r\n window.onresize = resize;\r\n\t brd3.create('text',[10, 28, 'For Loop '],{cssStyle:'fontFamily:Oswald;', anchorX:'middle', anchorY: 'middle', fontSize:function(){return Math.round(32*brd3.canvasWidth/500.)}, fixed:true});\r\n//congruent triangle//\r\n var x =0.;\r\n\t var y =0.;\r\n\t var alpha =0.;\r\n\t var imax = brd3.create('input', [5, 24, 10, 'For [ i = 1;  i++;  i <  '], {cssStyle: 'fontFamily:Lato;width:5%;', fontSize:function(){return Math.round(22*brd3.canvasWidth/800.)},fixed:true, maxlength:2});\r\n\t //\r\n\t var xpp = brd3.create('input', [5, 22, 1., '   x = x +  '], {cssStyle: 'fontFamily:Lato;width:5%;', fontSize:function(){return Math.round(22*brd3.canvasWidth/800.)},fixed:true, maxlength:1});\r\n\t //\r\n\t //\r\n\t var ypp = brd3.create('input', [5, 20, 1., '   y = y +  '], {cssStyle: 'fontFamily:Lato;width:5%;', border:{strokeWidth:2}, fontSize:function(){return Math.round(22*brd3.canvasWidth/800.)},fixed:true, maxlength:1});\r\n\t //\r\n\t var pt2 = brd3.create('point', [0., 0.0],{withLabel:false, fixed:false, visible:false});\r\n\t var pt3 = brd3.create('point', [0., 0.0],{withLabel:false, fixed:false, visible:false});\r\n\t var pt33 = brd3.create('point', [5, 0.0],{face:'o' , name:'pp', size:2, withLabel:false, fixed:false, visible:false});\r\n\t var pt40 = brd3.create('point', [function(){return xpp.Value()*5}, 0.0],{withLabel:false, fixed:false, visible:false});\r\n\r\n\t var pt4 = brd3.create('point', [5, 0.0],{withLabel:false, fixed:false, visible:false});\r\n\t var pt44 = brd3.create('point',[5, function(){return ypp.Value()*5/xpp.Value()}],{face:'o' , name:'pp', size:2, withLabel:false, fixed:false, visible:false});\r\n//\r\n\t var arr2 = brd3.create ('arrow', [pt2, pt3], {visible: false, name:'h', strokeColor:'#80879A', strokeWidth: 2});\r\n\t var arr3 = brd3.create ('arrow', [pt33,pt4], {visible: false, name:'h', strokeColor:'#80879A', strokeWidth: 2});\r\n\r\n\t //\r\n\t brd3.create('image',['/assets/rectt.svg', [4.5, 9.25], [14, 24]], {fixed:true, highlight:false, fillOpacity:1, shadow:true});\r\n var t = brd3.create('turtle',[0, 0], {visible:false, strokeWidth:0});\r\n\t var pts = brd3.create('point', [function(){return t.X()}, function(){return t.Y()}],{name:'', size:function(){return 2*brd3.canvasHeight/800},color:'black', trace:true});\r\n\t brd3.create('image',['/assets/rabbit.svg', [function(){return t.X()-1.25}, function(){return t.Y()+0.25}], [2.5, 2.5]], {fixed:true});\r\n t.hideTurtle();\r\n //t.setPos(0,3);\r\n //t.setPenColor('purple');\r\n var i =1;\r\n\t var runXcontrol= 0;\r\n //var beta =0;\r\n //Starting Point\r\n brd3.create('point', [0, 0],{name:'Start', size:function(){return 4*brd3.canvasHeight/800}, fillColor:'white', strokeColor:'black', fixed:true, label:{anchorX:'middle', display:'internal', anchorY: 'top', fontSize:function(){return 18*brd3.canvasHeight/800}, offset:[0, 0], cssStyle:'fontFamily:Oswald;'}});\r\n\t //Finish Point\r\n\t brd3.create('point', [() => x, ()=>y],{visible:()=>i==imax.Value(), name:'Finish', size:function(){return 4*brd3.canvasHeight/800}, fillColor:'white', strokeColor:'black', fixed:true, label:{anchorX:'middle', display:'internal', anchorY:'top', fontSize:function(){return 18*brd3.canvasHeight/800}, offset:[0, 0], cssStyle:'fontFamily:Oswald;'}});\r\n\t //\r\n //var tf = brd3.create('transform', [function(){return a.Y()-3+1}, function(){return a.Y()-3+1}], {type: 'scale'});\r\n var runX = function() {\r\n\t if(runXcontrol!=1){return;}\r\n\t\tif (i =10 &&i<= 20) {// stop after two rounds\r\n // i += 1;\r\n\t\t// t.forward(1);\r\n // t.setPenColor('blue');\r\n\t\tif(i<=imax.Value() & runXcontrol==1){\r\n setTimeout(runX, 600);\r\n\t\t}\r\n }\r\n //var hat =brd3.create('point', [-6.75, 4.], {visible:false});\r\n var sailor = brd3.create('image',['/assets/play-button.svg', [-6, 18.], [6, 6]], {fixed:true});\r\n\t brd3.create('text', [-5, 24.5, \"Tap to Start!\"], {visible: true, fixed: true, fontSize:function(){return 18*brd3.canvasHeight/800}, cssStyle:'fontFamily:Oswald;'});\r\n\t brd3.create('text', [10, 16, \"Orange fields are modifiable.\"], {anchorX:'middle', anchorY:'middle', visible: true, fixed: true, fontSize:function(){return 18*brd3.canvasHeight/800}, cssStyle:'fontFamily:Oswald;'});\r\n\t var nmax =brd3.create('image',['/assets/yellowLight.svg', [25, 22], [2, 2]], {fixed:true, highlight:false, fillOpacity:function(){if(i==1){return 1} else{return 0.1}}});\r\n var nx =brd3.create('image',['/assets/redLight.svg', [25, 20], [2, 2]], {fixed:true, highlight:false, fillOpacity:function(){if(i>1 && i 0 && alpha < 17 || alpha > 20 && alpha < 40 || alpha >=45 && alpha < 60 || alpha >=64 && alpha <= 80 || alpha >80 && alpha<90 || alpha >92){return true } else {return false}}});\r\n //var rope = brd3.create('image',['assets/fiber.svg', [-4.25, 3.], [0.5, 0.5]], {attractors:[hat],attractorDistance:1, snatchDistance:2.});\r\n //var sail = function(){if(rope.X()-hat.X()<=0.0001 && rope.Y()-hat.Y()<=0.0001){return run();}};\r\n\t var res = function(){\r\n\t\t pts.moveTo([0, 0]);\r\n\t\t alpha=0;\r\n\t\t t.cs();\r\n\t\t i=1;\r\n\t\t runXcontrol=0;\r\n\t\t x=0;\r\n\t\t y=0;\r\n\t\t t.moveTo([0,0]);\r\n\t\t pts.clearTrace();\r\n\t\t t.left(0);\r\n\t\t pt3.moveTo([0,0]);\r\n\t\t pt4.moveTo([5,0]);\r\n\t\t slopeX.setAttribute({visible: false});\r\n\t\t slopeY.setAttribute({visible: false});\r\n\t };\r\n\t sailor.on('down', function(){res(); runXcontrol=1; runX(); slope1(100); slope2(500);});\r\n\t //brd3.create('image',['/assets/start.svg', [-5, 14.], [4, 4]], {fixed:true, visible:()=>i==1});\r\n\t //brd3.create('image',['/assets/finish.svg', [-5, 14.], [4, 4]], {fixed:true, visible:()=>i==imax.Value()});\r\n\t //\r\n\t brd3.create('text', [23, 23, function(){return 'i = ' + i;}],{visible:()=> i==1, display:'internal', color:'blue', anchorX:'middle', anchorY: 'middle', cssStyle:'fontFamily:Oswald;',fontSize:function(){return Math.round(22*brd3.canvasWidth/800.)}, parse:true,fixed:true});\r\n\t //\r\n\t brd3.create('text', [23, 21, function(){return 'i = ' + i;}],{visible:()=> i>1&&i\r\n
\r\n

\n What is a For Loop?\n

\r\n

\r\n The for loop is a common construct in computer programming. A for loop is simply used to iterate\r\n repeat an action a given number of times. For example, it is a common scenario in computer programming\r\n to execute a block of code over and over for multiple times — each time with a different value of the control parameter.\r\n

\r\n

\n Structure of a For Loop\n

\r\n

\r\n A for loop has four essential components: initialization, conditional, incrementation and an action statement.\r\n

    \r\n
  • \n
    Initialization
    \r\n This statement is used to declare and/or initialize the loop control variable, e.g., i=0.\r\n
  • \r\n
  • \n
    Conditional
    \r\n This is a Boolean statement used to evaluate the condition for execution of the body of the loop, e.g., i<=5.\r\n
  • \r\n
  • \n
    incrementation
    \r\n This statement is used to increment the counter variable, e.g., i++\r\n
  • \r\n
  • \n
    Action Statement
    \r\n This represents the block of code that is iteratively executed as long as the condition checked remains true.\r\n
  • \r\n
\r\n\r\n Shown below is the generic structure of a for loop.\r\n

\r\n
\r\nfor (initialization; conditional; incrementation)\r\n{\r\naction_statement;\r\n}\r\nend\r\n
\r\n

\r\n

Example of For Loop

\r\n

\r\n The syntax used to write the for loop varies from language to language. Examples of\r\n for loops from Python, C and others are given below. The examples print out\r\n the numbers 0-9 (inclusive of 0 and 9).\r\n

\n Syntax of a for loop in Python3 Programming Language\n
\r\n
\r\nfor i in range(0, 10):\r\n    print(i)\r\n    
\r\n

\r\n
\n Syntax of a for loop in C Programming Language:\n
\r\n

\r\n

\r\nfor (int i = 0; i < 10; ++i) {\r\n    printf(\"%d\\n\", i);\r\n}\r\n    
\r\n

\r\n

\n MagicGraph | For Loop Explained\n

\r\n

\n This MagicGraph offers a visually interactive demonstration of how a for loop works.\r\n This simple computer program uses the for loop to incrementally move the rabbit from one point to another in N = 10 number of steps.\r\n

    \r\n
  • \n
    Initialization
    \r\n The loop control variable i is initialized to a value of 1 (the yellow light is on).\r\n
  • \r\n
  • \n
    Conditional
    \r\n Boolean statement to evaluate if i is less than or equal to N. If it is, the Boolean statement returns True (green light). Otherwise, it returns False (the red light is on).\r\n
  • \r\n
  • \n
    Incrementation
    \r\n Then, i is updated in increments of 1 as long as its value is smaller than or equal to N (the default value is 10 but it can be modified).\r\n
  • \r\n
  • \n
    Action Statement
    \r\n For each increment (while the green light is on), the x and y positions of the rabbit are updated by specified increments (defaults are 1 but they can be modified).\r\n
  • \r\n
\r\n

\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n\r\n\r\n\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Lesson.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Lesson.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Lesson.vue?vue&type=template&id=04f84374&\"\nimport script from \"./Lesson.vue?vue&type=script&lang=js&\"\nexport * from \"./Lesson.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Lesson.vue?vue&type=style&index=0&id=04f84374&prod&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Lesson.vue?vue&type=style&index=0&id=04f84374&prod&lang=scss&\""],"sourceRoot":""}