Difference between revisions of "Template:1010Chapter"

From CompSciWiki
Jump to: navigation, search
(Infinite Loops)
m (expr tag fix)
 
(50 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<table border=0 cellpadding=14 cellspacing=0 width="100%">
+
__NOTOC__
<tr>
+
__NOEDITSECTION__
<td bgcolor="#222222" width="70%">
+
[[COMP1010|Wiki 1010 Table of Contents]]
<font color="white">
+
<!--table for Header begins-->
 +
{|style="width: 100%; font-weight: normal;border-left: 1px solid grey; border-top: 1px solid grey; border-bottom: 1px solid grey;border-right: 1px solid grey;" cellpadding="5" cellspacing="0"
 +
|-
 +
!colspan=3 width: 100%; style="font-weight: normal; padding: 15px; background: #E1E7EE;" align="left" valign="top"|
 +
{{ #if: {{{Picture|}}} | [[Image:{{{Picture}}}|200px|right]] }}
 +
{{ #if: {{{ChapterName|}}} | = {{{ChapterName}}} = | = Chapter {{{ChapterNum|#}}} = }}
 +
{{{Introduction|Introduction goes here.}}}
 +
__NOTOC__ __NOEDITSECTION__
 +
|-
 +
|width="33%" align="center" style="background: #C4D0DD" | &nbsp;
 +
|width="34%" align="center" style="background: #C4D0DD" | Write a [[Program_a_day|Program a Day]]
 +
|width="33%" align="center" style="background: #C4D0DD" | [[Case Studies]]
 +
|}
 +
{{{Body|}}}
  
=Chapter Introduction=
+
<br>
Until now all your programs have been working from top to bottom. Imagine if you were to write a game to guess a secret number from 1 to 100. The entire program would consist of one hundred [[Control Structures#The If Statement|if statements]] to account for each turn to check and see if the number chosen is correct; a situation like this is where a loop will come in to play and reduce those one hundred statements into one.
+
<br>
 +
----
 +
{|width="100%"
 +
|-
 +
! width="33%" align="left" | {{ #if: {{{PChapterLink|}}} | Chapter {{ #expr: {{{ChapterNum}}} - 1 }}: {{{PChapterLink}}} }}
 +
! width="34%" align="center" | [[COMP1010|Table of Contents]]
 +
! width="33%" align="right" | {{ #if: {{{NChapterLink|}}} | Chapter {{ #expr: {{{ChapterNum}}} + 1 }}: {{{NChapterLink}}} }}
 +
|}
  
A loop is a [[Control Structures|control structure]] that allows you to repeat the same sequence of code as long as a given [[test condition]] evaluates to true. Every passage through this sequence of code is called an ''iteration''.  If you repeat the same sequence of code 20 times, then you have performed 20 iterations.
+
[[Category:COMP 1010]]
  
</font>
+
<!--
</td>
+
{{1010Chapter|ChapterNum=1
 +
|Introduction=
 +
|Picture=
  
<td width=30%>
+
|Body=
[[Image:CoffeeCup.jpg|float]]
+
</td>
+
</tr>
+
  
<tr>
 
<td colspan=2 bgcolor="#CC9933">
 
__TOC__
 
 
  
</td>
+
|PChapterNum=1
</tr>
+
|PChapterLink=[[What Is Programming]]
</table>
+
|NChapterNum=2
 
+
|NChapterLink=[[Java Fundamentals]]
==[[While Loops]]==
+
}}
 
+
-->
==[[for|For Loops]]==
+
 
+
==[[nested loops|Nested Loops]]==
+
 
+
==[[Test_condition|Test Condition]]==
+
 
+
==[[Scope]]==
+
 
+
==[[Infinite Loops]]==
+
 
+
==[[Additional Information]]==
+
 
+
==[[Loop Review Questions and Exercises|Review Questions and Exercises]]==
+

Latest revision as of 12:30, 2 December 2010


Wiki 1010 Table of Contents

Chapter #

Introduction goes here.

  Write a Program a Day Case Studies





Table of Contents