<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>guess the number topic</title>
		<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic</link>
		<description>Posts in the discussion thread &quot;guess the number topic&quot;</description>
				<copyright></copyright>
		<lastBuildDate></lastBuildDate>
		
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-718038</guid>
				<title>Re: guess the number topic</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-718038</link>
				<description></description>
				<pubDate>Mon, 08 Mar 2010 16:34:29 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>12785</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Ok, ports for BaCon and R now added to the list. See full list at <a href="http://www.ascii-world.com/guessit:guess-it">http://www.ascii-world.com/guessit:guess-it</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-717925</guid>
				<title>Re: guess the number topic - Guess a number in R</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-717925</link>
				<description></description>
				<pubDate>Mon, 08 Mar 2010 13:53:04 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>12785</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks Lance. Ill add your contribution today.</p> <p>I assume your code should look like this</p> <div class="code"> <pre> <code># Number guessing game for R # This is a test program in R to demonstrate interactive # programming and the If and While control structures # This program must be started using the source() command NumGuess &lt;- 0 # Initialise this symbol, used to count the number guesses Uname &lt;- readline("What is your name? ") cat("Guess a number between 1 and a 100 ", Uname, "\n") ComNum &lt;- as.integer(runif(1, min = 1, max = 100)) Guess &lt;- as.integer(readline("Enter your guess: ")) NumGuess &lt;- NumGuess + 1 while (ComNum != Guess) { if (Guess&lt;ComNum) { cat("Your guess is too low!", "\n") } else { cat("Your guess is too high!", "\n") } Guess &lt;- as.integer(readline("Please enter a new guess: ")) NumGuess &lt;- NumGuess + 1 } cat(Uname,", you got it! ", "\n") cat("It took you ",NumGuess," guesses to guess right.", "\n")</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-717911</guid>
				<title>Re: guess the number topic - Guess a number in R</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-717911</link>
				<description></description>
				<pubDate>Mon, 08 Mar 2010 13:45:52 +0000</pubDate>
				<wikidot:authorName>LanceGary</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>The numbered entries at the beginning of the R code should be "#" which is the R indicator of a comment. Don't try to enter numbered comments in R!</p> <p>Lance</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-717907</guid>
				<title>Re: guess the number topic - Guess a number in R</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-717907</link>
				<description></description>
				<pubDate>Mon, 08 Mar 2010 13:41:10 +0000</pubDate>
				<wikidot:authorName>LanceGary</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <ol> <li>Number guessing game for R <ol> <li>This is a test program in R to demonstrate interactive</li> <li>programming and the If and While control structures</li> <li>This program must be started using the source() command</li> </ol> </li> </ol> <p>NumGuess &lt;- 0 # Initialise this symbol, used to count the number guesses</p> <p>Uname &lt;- readline("What is your name? ")</p> <p>cat("Guess a number between 1 and a 100 ", Uname, "\n")</p> <p>ComNum &lt;- as.integer(runif(1, min = 1, max = 100))</p> <p>Guess &lt;- as.integer(readline("Enter your guess: "))</p> <p>NumGuess &lt;- NumGuess + 1</p> <p>while (ComNum != Guess) {</p> <p>if (Guess&lt;ComNum) {<br /> cat("Your guess is too low!", "\n")<br /> } else {<br /> cat("Your guess is too high!", "\n")<br /> }<br /> Guess &lt;- as.integer(readline("Please enter a new guess: "))</p> <p>NumGuess &lt;- NumGuess + 1<br /> }</p> <p>cat(Uname,", you got it! ", "\n")<br /> cat("It took you ",NumGuess," guesses to guess right.", "\n")</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-373063</guid>
				<title>Re: guess the number topic</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-373063</link>
				<description></description>
				<pubDate>Mon, 02 Feb 2009 09:56:05 +0000</pubDate>
				<wikidot:authorName>E.K.Virtanen</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Thanks rCX. Cool to get new versions for this one. Ill add your code in guess-it page when i get back home from work.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-372222</guid>
				<title>Re: guess the number topic</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-372222</link>
				<description></description>
				<pubDate>Sun, 01 Feb 2009 04:07:14 +0000</pubDate>
				<wikidot:authorName>rCX</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Really cool project. Here's one in MATLAB. I was going to write one if FASM for DOS as well.</p> <div class="code"> <pre> <code>% Guess what number for MATLAB 7.5.0 % rCX. 2009, public domain MIN = 1; MAX = 100; Plr_Guess = -1; while true() clc %Clear Command Window Randomed = uint8(rand() * ((MAX + 1) - MIN) + MIN); rounds = 0; disp(['Ok, i think random integer between ',num2str(MIN),' and ',num2str(MAX),'.']) disp('Your job is to guess what it is in as minimal tries as possible.') disp(' ') disp('After your every guess, ill give you hint is my number higher or lower than your guess.') disp('You can exit by ''guessing'' 0.') disp('Press any key to start game.') pause clc while true() rounds = rounds + 1; disp(['This is round number: ',num2str(rounds),'.']) Plr_Guess = str2num(input('Give your guess: ','s')); %'s' tells MATLAB to return input as string if Plr_Guess == 0 return %exit program elseif Plr_Guess &gt; Randomed disp('My number is smaller...') elseif Plr_Guess &lt; Randomed disp('My number is higher...') elseif Plr_Guess == Randomed break else return %exit program end disp(' ') end disp('You got it!!!') disp(['It took ',num2str(rounds),' rounds to guess right number.']) disp(' ') key = input('Do you want to play again? Enter ''y'' or ''n''. ','s'); if ~strcmp(key,'y') &amp;&amp; ~strcmp(key,'Y') break end end</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-70483</guid>
				<title>Re: guess the number topic</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-70483</link>
				<description></description>
				<pubDate>Wed, 21 Nov 2007 12:50:10 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>12785</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p><strong>Important</strong> about this project; Read more <a href="http://ascii-world.wikidot.com/forum/t-27823/guess-it-pages-changed">http://ascii-world.wikidot.com/forum/t-27823/guess-it-pages-changed</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-70466</guid>
				<title>Re: guess the number topic</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-70466</link>
				<description></description>
				<pubDate>Wed, 21 Nov 2007 11:29:57 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>12785</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks Jare for your contribution.<br /> <em>Finnish</em><br /> Pystyisitkö muokkaamaan tuota niin että se olisi hieman enemmän samallalailla toimiva kuin muutkin sorsat?<br /> Eli</p> <p>PÄÄLOOPPI<br /> tehdään valimistelut, printataan alkuteksti blaablaa</p> <p>PELILOOPPI<br /> kysellään kunnes oikein<br /> //PELILOOPPI</p> <p>Pääloopissa pysytään kunnen pelaaja arvaa 0 (eli haluaa lopettaa)<br /> //PÄÄLOOPPI</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-70303</guid>
				<title>Re: guess the number topic</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-70303</link>
				<description></description>
				<pubDate>Tue, 20 Nov 2007 21:19:48 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Sorry, the code just didn't end up in the way I ment (no indents etc.).</p> <p>Here is more better looking one: <a href="http://koti.mbnet.fi/jare1/filer/files/guess.CB">http://koti.mbnet.fi/jare1/filer/files/guess.CB</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-70298</guid>
				<title>Re: guess the number topic</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-70298</link>
				<description></description>
				<pubDate>Tue, 20 Nov 2007 21:15:03 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Here is mine, written in CoolBasic:</p> <div class="code"> <pre> <code>//the Ultimate Guessing Game (is that name proper English?) //By: Jarkko 'Jare' Linnanvirta 2007 (e-mail me if you want to ask something: kpelit2003@hotmail.com) //Can be used freely. 'The very important title SetWindow "the Ultimate Guessing Game!" 'Start by randomizing a number theNumber = Rand(1,100) Repeat Text 0,0, "Guess what number I am thinking (1 - 100)" 'Show console for user's ansrver Locate 0, ScreenHeight()-20 ansver = Input("? ") 'Check ansver when user hit's enter If KeyHit(cbKeyReturn) Then times + 1 If ansver = theNumber Then 'User got it right Text 0,20, "Yes, that's what I was thinking!" Text 0,40, "You tried "+times+" times." DrawScreen WaitKey theNumber = Rand(1,100) times = 0 ElseIf ansver &lt; theNumber Then 'User got it wrong Text 0,20, "No, too low!" DrawScreen WaitKey Else 'User got it wrong again Text 0,20, "No, too high!" DrawScreen WaitKey End If CloseInput 'Clear ansver in console End If DrawScreen 'Update screen so we can see something Forever 'Eternal loop (of course there is an inbuild safe exit feature: Escape key closes the program)</code> </pre></div> <p><em>admin edit:</em> added code tags.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-66316</guid>
				<title>Re: guess the number topic</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-66316</link>
				<description></description>
				<pubDate>Fri, 09 Nov 2007 06:25:01 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>12785</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Just added thinBasic version provided by ErosOlmi from thinBasic forums.<br /> Now we have these versions here, looking good :)</p> <p>Guess it in Bash-Script<br /> Guess It in Ansi C<br /> Guess It in ChipMunk BASIC<br /> Guess It in FreeBASIC<br /> Guess It in FreePascal<br /> Guess It in python<br /> Guess It in QBASIC<br /> Guess It in Run BASIC<br /> Guess It in SmallBasic<br /> Guess It in thinBasic<br /> Guess It in yaBasic</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-55357</guid>
				<title>Re: guess the number topic</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-55357</link>
				<description></description>
				<pubDate>Sun, 07 Oct 2007 06:45:07 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>12785</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Linux Bash-Script version <a href="http://www.ascii-world.com/guess-it-bash-script">http://www.ascii-world.com/guess-it-bash-script</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-41082</guid>
				<title>Re: guess the number topic</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-41082</link>
				<description></description>
				<pubDate>Tue, 14 Aug 2007 15:49:41 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>12785</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p><a href="http://www.ascii-world.com/guess-it">http://www.ascii-world.com/guess-it</a> ;)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-40967</guid>
				<title>Re: guess the number; FB &amp; python</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-40967</link>
				<description></description>
				<pubDate>Tue, 14 Aug 2007 01:35:24 +0000</pubDate>
				<wikidot:authorName>MystikShadows</wikidot:authorName>				<wikidot:authorUserId>11043</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I don't have the Ada compiler installed, but I did do a FreePascal Version</p> <div class="code"> <pre> <code>{ Guess program. public domain as of august 13th 2007. Mystikshadows } Program GuessingGame; Uses Crt; Const RandomMinimum = 1; RandomMaximum = 100; Var RandomNumber: Integer; UserGuess: Integer; UserAnswer: Char; RoundNumber: Integer; CanExit: Integer; CancelGuessing: Integer; Begin Randomize; CanExit := 0; While CanExit = 0 Do Begin RandomNumber := Random(RandomMaximum) + 1; WriteLn('Ok, I just thought of a number between ', RandomMinimum, ' and ', RandomMaximum); WriteLn('And you can try to guess it in the least amount of tries.'); WriteLn; WriteLn('After each guess I will give you hints as to if my number is'); WriteLn('higher or lower than your guess again or enter 0 to exit the'); WriteLn('current guessing.'); WriteLn; RoundNumber := 1; CancelGuessing := 0; UserGuess := 0; UserAnswer := #32; While (RandomNumber &lt;&gt; UserGuess) And (CancelGuessing = 0) Do Begin Write('Round # ', RoundNumber, ': '); ReadLn(UserGuess); If (UserGuess = 0) Then CancelGuessing := 1; If (UserGuess &gt; RandomNumber) Then WriteLn('You are too high, guess lower.'); If (UserGuess &lt; RandomNumber) Then WriteLn('You are too low, guess higher.'); RoundNumber := RoundNumber + 1; End; If RandomNumber = UserGuess Then Begin WriteLn; WriteLn('You guess the number in ', RoundNumber - 1, ' guesses.'); End; While (UserAnswer &lt;&gt; 'y') And (UserAnswer &lt;&gt; 'Y') And (UserAnswer &lt;&gt; 'n') And (UserAnswer &lt;&gt; 'N') Do Begin WriteLn; Write('Do you want to try another round (Y for Yes, N for No)?'); ReadLn(UserAnswer); End; If (UserAnswer = 'n') Or (UserAnswer = 'N') Then CanExit := 1; End; End.</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-40917</guid>
				<title>Re: guess the number; FB &amp; python</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-40917</link>
				<description></description>
				<pubDate>Mon, 13 Aug 2007 18:13:27 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>12785</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Im nearly finished my <a href="http://tldp.org/LDP/abs/html/index.html">Bash-Script</a> version of this game. Would be cool to get more these. Guys, you got any time here? Mystik, ADA ;) Rick?</p> <p>I created link to menu, you can see it. Would be nice to have 5 to 10 different programming/scripting language version soon so we could open that link :)</p> <p>ASCII only, language free naturally. :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-32546</guid>
				<title>Re: guess the number; FB &amp; python</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-32546</link>
				<description></description>
				<pubDate>Wed, 04 Jul 2007 19:04:33 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>12785</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Well Mystik, its prettier than you :D<br /> I freakin jerk forgot that i once made this darn game before with python (memory over… you know lol)</p> <div class="code"> <pre> <code>#! /usr/bin/python import random, os To get right keyword to clear screen for linux or windows usr_os = os.name if usr_os != "POSIX": clear_screen = "clear" else: clear_screen = "cls" # lets get random number to guess rand_number = random.randint(1,100) # ok, we reset round counter and value of user guess. round_counter = guessed = 0 # ok, "main" loop of game while guessed != rand_number: os.system(clear_screen) round_counter = round_counter + 1 print "This is round number:", round_counter print rand_number #ok, now we can see the number to make testing easier. guessed = input ("What is your guess?") if guessed &lt; rand_number: print "Sorry, try higher number." elif guessed &gt; rand_number: print "No, try smaller number." elif guessed &lt; 1 or guessed &gt; 100: print "Value must be between 1 to 100" else: print "Error in given value." raw_input ("Press &lt;ENTER&gt; to continue!") print "Correct number." print print "Random number was:", rand_number, " and your guess was:", guessed, "." print print "It took:", round_counter, " rounds to guess it." print "Thank you for playing."</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-32542</guid>
				<title>Re: guess the number; FB &amp; python</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-32542</link>
				<description></description>
				<pubDate>Wed, 04 Jul 2007 18:41:30 +0000</pubDate>
				<wikidot:authorName>Anonymous</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Well it's not BUTT Ugly code yet. But when you get better at python it might actually look worst than this ;-). hehe…</p> <p>This actually looks pretty good for 2 hours of learning. and well, it works, really the bottom line here :-)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.ascii-world.com/forum/t-12998#post-32531</guid>
				<title>guess the number; FB &amp; python</title>
				<link>http://www.ascii-world.com/forum/t-12998/guess-the-number-topic#post-32531</link>
				<description></description>
				<pubDate>Wed, 04 Jul 2007 18:02:47 +0000</pubDate>
				<wikidot:authorName>EKVirtanen</wikidot:authorName>				<wikidot:authorUserId>12785</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>While waiting sauna to heat up, i decided to study more python since it seems to be quiet in every darn forum there is on internet.<br /> First, i created simple "guess the number" game with freebasic and then converted it to python.<br /> For python programmers, my code prolly looks ugly as hell, but it is like my first &gt; 5 lines long self-made code, so shut up :P</p> <p>Anyway, after studying more python documents, it feels interesting language. Want to learn more eventho i still hate since cant use CAPS at anywhere :D Silly me.</p> <p>guess.bas</p> <div class="code"> <pre> <code>' Guess what number for FreeBASIC .17b stable ' E.K.virtanen. 2007, public domain Randomize TIMER CONST MIN = 1 CONST MAX = 100 Dim AS Integer Plr_guess, Randomed, Rounds ' Main module of program. DO Color 15, 0 : CLS Randomed = INT(RND * ((MAX + 1) - MIN) + MIN) Rounds = 0 Print "Ok, i think random number between "; MIN; MAX; "." Print "Your job is to guess what it is in as minimal tries as possible." Print "" Print "After your every guess, ill give you hint is my number higher or lower than your guess." Print "You can exit by 'guessing' 0." Print "Press any key to start game."; : GETKEY ' From here starts the gaming loop itself. This is looped until guess it right one. CLS DO Rounds = (Rounds + 1) Print "This is round number: "; Rounds; "." INPUT "Give your guess: "; Plr_guess Color 14, 0 IF Plr_guess &gt; Randomed THEN Print "My number is smaller..." END IF IF Plr_guess &lt; Randomed THEN Print "My number is higher..." END IF Color 15, 0 IF Plr_guess = Randomed THEN EXIT DO LOOP While Plr_Guess &lt;&gt; 0 IF Randomed &lt;&gt; Plr_Guess THEN EXIT DO Print "You got it!!!" Print "It took "; Rounds; " rounds to guess right number." Print "" Print "Press 'y' to play again. Any other key to quit." DO Until INKEY$ &lt;&gt; "" : Loop IF INKEY$ &lt;&gt; "y" AND INKEY$ &lt;&gt; "Y" THEN EXIT DO Loop END</code> </pre></div> <p>guess.py. Result of 2 hours python learning.</p> <div class="code"> <pre> <code># Guess what number for python. My one of first python codes so it prolly looks ugly as hell. # E.K.virtanen. 2007, public domain # modules we need here import random import os # function wich solves what OS is used. linux and windows regignized. def os_clear(): return_value = "\n" if os.name == "posix": return_value = 'clear' elif os.name in ("nt", "dos", "ce"): return_value = 'CLS' return return_value # Constant variables const_min = 1 const_max = 100 clear_screen = os_clear() # MAIN MODULE OF PROGRAM guess_game = end_game = 'play' while end_game == 'play': os.system(clear_screen) randomed = random.randint(const_min, const_max) rounds = 0 print print 'Ok, i think random number between ', str(const_min), ' to ' + str(const_max) print 'Your job is to guess what it is in as minimal tries as possible.' print '' print 'After your every guess, ill give you hint is my number higher or lower than your guess.' print 'You can exit by "guessing" (0).' raw_input('Press &lt;ENTER&gt; to start game.') # guessing part of game os.system(clear_screen) while guess_game == 'play': rounds += 1 print 'This is rounds number: ', str(rounds) + '.' print plr_guess = int(raw_input('Give your guess: ')) if int(plr_guess) &lt; randomed: print 'My number is higher...' elif int(plr_guess) &gt; randomed: print 'Mu number is lower...' elif int(plr_guess) == randomed: guess_game = 'stop' elif int(plr_guess) == 0: break else: print 'Give value between ', str(const_min), ' to ' + str(const_max), ' please.' if guess_game == 'stop': end_game = 'stop' os.system(clear_screen) print 'You got it!' print 'It took ', str(rounds), ' rounds to guess right number.' print print ' Press &lt;y&gt; + &lt;ENTER&gt; to play again. &lt;ENTER&gt; only to quit.' if raw_input() == 'y': guess_game = end_game = 'play'</code> </pre></div> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>