<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ASK%3AGuessing_Game</id>
	<title>TI-BASIC:SK:Guessing Game - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ASK%3AGuessing_Game"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:SK:Guessing_Game&amp;action=history"/>
	<updated>2026-06-06T06:31:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:SK:Guessing_Game&amp;diff=1708&amp;oldid=prev</id>
		<title>Maintenance script: Automated internal link correction</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:SK:Guessing_Game&amp;diff=1708&amp;oldid=prev"/>
		<updated>2016-02-25T00:55:48Z</updated>

		<summary type="html">&lt;p&gt;Automated internal link correction&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:55, 25 February 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l70&quot;&gt;Line 70:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 70:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Template:TI-BASIC:Next-prev&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Template:TI-BASIC:Next-prev&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|prevpage = TI-BASIC:SK:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Exercises-basics&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|prevpage = TI-BASIC:SK:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Exercises_Basics&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|prevtitle = Chapter Exercises&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|prevtitle = Chapter Exercises&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|tocpage = TI-BASIC:Starter_Kit&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|tocpage = TI-BASIC:Starter_Kit&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:SK:Guessing_Game&amp;diff=1651&amp;oldid=prev</id>
		<title>Maintenance script: Automated internal link correction</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:SK:Guessing_Game&amp;diff=1651&amp;oldid=prev"/>
		<updated>2016-02-25T00:46:44Z</updated>

		<summary type="html">&lt;p&gt;Automated internal link correction&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:46, 25 February 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l70&quot;&gt;Line 70:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 70:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Template:TI-BASIC:Next-prev&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Template:TI-BASIC:Next-prev&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|prevpage = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sk&lt;/del&gt;:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;exercises&lt;/del&gt;-basics&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|prevpage = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TI-BASIC&lt;/ins&gt;:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SK:Exercises&lt;/ins&gt;-basics&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|prevtitle = Chapter Exercises&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|prevtitle = Chapter Exercises&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|tocpage = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;starter&lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;kit&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|tocpage = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TI&lt;/ins&gt;-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;BASIC:Starter_Kit&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|toctitle = Table of Contents&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|toctitle = Table of Contents&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|nextpage = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sk&lt;/del&gt;:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;homescreen&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|nextpage = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TI-BASIC&lt;/ins&gt;:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SK:Homescreen&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|nexttitle = More on the Home Screen}}[[Category:TI-BASIC]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|nexttitle = More on the Home Screen}}[[Category:TI-BASIC]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:TIBD]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:TIBD]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:SK:Guessing_Game&amp;diff=495&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:SK:Guessing_Game&amp;diff=495&amp;oldid=prev"/>
		<updated>2016-02-24T18:04:18Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is the end of the first part of the tutorial! To review, here is a sample program that includes the ideas you&amp;#039;ve learned about in the previous few pages: the traditional guessing game. It will ask you to guess a number between 1 and 1000 in 10 guesses; every time you guess, it will tell you if the number is lower or higher.&lt;br /&gt;
&lt;br /&gt;
= The Program =&lt;br /&gt;
&lt;br /&gt;
 :ClrHome&lt;br /&gt;
 :randInt(1,1000)→N&lt;br /&gt;
 :Disp &amp;quot;Guess a number&amp;quot;&lt;br /&gt;
 :For(I,1,10)&lt;br /&gt;
 :Input &amp;quot;Guess?&amp;quot;,G&lt;br /&gt;
 :If N=G:Then&lt;br /&gt;
 :Disp &amp;quot;You&amp;#039;ve got it!&amp;quot;,&amp;quot;Guesses:&amp;quot;,I&lt;br /&gt;
 :Pause&lt;br /&gt;
 :Stop&lt;br /&gt;
 :Else&lt;br /&gt;
 :If N&amp;gt;G:Then&lt;br /&gt;
 :Disp &amp;quot;Higher...&amp;quot;&lt;br /&gt;
 :Else&lt;br /&gt;
 :Disp &amp;quot;Lower...&amp;quot;&lt;br /&gt;
 :End&lt;br /&gt;
 :End&lt;br /&gt;
 :End&lt;br /&gt;
 :Disp &amp;quot;You lose!&amp;quot;,&amp;quot;The number was:&amp;quot;,N&lt;br /&gt;
&lt;br /&gt;
= An Explanation =&lt;br /&gt;
&lt;br /&gt;
 :ClrHome&lt;br /&gt;
 :randInt(1,1000)→N&lt;br /&gt;
 :Disp &amp;quot;Guess a number&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The program starts off with a bit of a curve ball: two commands, [[TI-BASIC:Clrhome|ClrHome]] and [[TI-BASIC:Randint|RandInt(]], that we haven&amp;#039;t really covered yet. ClrHome clears the home screen, and randInt( gives a random number. These will be covered later on, in the second part of this tutorial, so don&amp;#039;t worry if you don&amp;#039;t quite understand them. In any case, the command randInt(1,1000)→N makes N a random number between 1 and 1000.&lt;br /&gt;
&lt;br /&gt;
Finally, we display &amp;quot;Guess a number&amp;quot; to start off the game.&lt;br /&gt;
&lt;br /&gt;
 :For(I,1,10)&lt;br /&gt;
 :Input &amp;quot;Guess?&amp;quot;,G&lt;br /&gt;
 	...&lt;br /&gt;
 :End&lt;br /&gt;
&lt;br /&gt;
To give the player 10 guesses, we use a For( loop that goes from 1 to 10. The variable I is the number of the guess we&amp;#039;re on.&lt;br /&gt;
&lt;br /&gt;
The Input command simply asks for a guess, and stores it to G. Remember that N is the number the player&amp;#039;s trying to guess.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 :If N=G:Then&lt;br /&gt;
   :Disp &amp;quot;You&amp;#039;ve got it!&amp;quot;,&amp;quot;Guesses:&amp;quot;,I&lt;br /&gt;
   :Pause&lt;br /&gt;
   :Stop&lt;br /&gt;
 :Else&lt;br /&gt;
   :If N&amp;gt;G:Then&lt;br /&gt;
     :Disp &amp;quot;Higher...&amp;quot;&lt;br /&gt;
   :Else&lt;br /&gt;
     :Disp &amp;quot;Lower...&amp;quot;&lt;br /&gt;
   :End&lt;br /&gt;
 :End&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the most complicated part of the code. To make the nesting of the If commands clearer, it&amp;#039;s been indented above, although it wouldn&amp;#039;t be on a calculator.&lt;br /&gt;
&lt;br /&gt;
The first check is if N=G: if the guess is correct. If it is, we go to the Then part of the first If. Here we display &amp;quot;You&amp;#039;ve got it!&amp;quot;, and how many guesses it took. We pause the program with [[TI-BASIC:Pause|Pause]], so that the user can read the info we&amp;#039;ll provide. Then with the [[TI-BASIC:Stop|Stop]] command, we exit the program.&lt;br /&gt;
&lt;br /&gt;
If the guess wasn&amp;#039;t correct, we go to the Else part of the first If. Now we need to display a hint - higher or lower. This is accomplished by the second If statement. If N&amp;gt;G, it goes to the Then part, and displays &amp;quot;Higher...&amp;quot; Otherwise, it goes to the Else part, and displays &amp;quot;Lower...&amp;quot; There is no Stop here, so the program continues from there, and does the next cycle of the loop.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 :Disp &amp;quot;You lose!&amp;quot;,&amp;quot;The number was:&amp;quot;,N&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure that this code is easy to understand -- but why it&amp;#039;s here might not be. Think about it, though: this code is right after the End of the For( loop. The For( loop repeated 10 times (once for each guess) without getting here -- once it does, that means that 10 guesses have passed; and the player still hasn&amp;#039;t guessed the number, or otherwise the program would have stopped.&lt;br /&gt;
&lt;br /&gt;
So once we&amp;#039;re here, the player has lost the game. The thing to do now is to display the appropriate message, along with telling him what the right number was.&lt;br /&gt;
&lt;br /&gt;
{{Template:TI-BASIC:Next-prev&lt;br /&gt;
|prevpage = sk:exercises-basics&lt;br /&gt;
|prevtitle = Chapter Exercises&lt;br /&gt;
|tocpage = starter-kit&lt;br /&gt;
|toctitle = Table of Contents&lt;br /&gt;
|nextpage = sk:homescreen&lt;br /&gt;
|nexttitle = More on the Home Screen}}[[Category:TI-BASIC]]&lt;br /&gt;
[[Category:TIBD]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>