Difference between revisions of "Template:1010Chapter"

From CompSciWiki
Jump to: navigation, search
Line 1: Line 1:
 
<table border=0 cellpadding=14 cellspacing=0 width="100%">
 
<table border=0 cellpadding=14 cellspacing=0 width="100%">
 
<tr>  
 
<tr>  
<td colspan=3 bgcolor=#8B4513 width="100%">
+
<td colspan=3 bgcolor=#8B4513 width="100%" height="20%">
 
<!-- background colour "saddle brown" chosen from http://gucky.uni-muenster.de/cgi-bin/rgbtab-en -->
 
<!-- background colour "saddle brown" chosen from http://gucky.uni-muenster.de/cgi-bin/rgbtab-en -->
 
<font color="white">
 
<font color="white">
  
 
=Chapter Introduction=
 
=Chapter Introduction=
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.
+
{{{Introduction|}}}
 
+
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.
+
  
 
</font>
 
</font>
 
</td>
 
</td>
  
<td width=30%>
+
<td width=30% rowspan=2 valign="top">
 
[[Image:CoffeeCup.jpg|float]]
 
[[Image:CoffeeCup.jpg|float]]
 
</td>
 
</td>
Line 28: Line 26:
 
</tr>
 
</tr>
 
</table>
 
</table>
 
==[[Databases]]==
 
asdjfhask fhlkjas dhflkasj dhlfah lksajdfh lsakjdhf lsjakd fa
 
 
==[[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]]==
 

Revision as of 15:06, 20 March 2007

Chapter Introduction

float