Hi, <div><br></div><div>I am new to Python, and have hit a WALL. Any help is appreciated! Below is what I have so far, for the "High Low Game"...when I try to run it, nothing happens, so I have been unable to finish it. I am sure it is something simple...</div>
<div><br></div><div><div>#assignment 2 part 1 high low</div><div><br></div><div>def main():</div><div> print " Pick a number between 1 and 1000 and I will try to guess it"</div><div> print "in no more than 10 tries. After each guess, enter 0 if I"</div>
<div> print "got it right, -1 if I need to guess lower, and 1 if I need to"</div><div> print "guess higher."</div><div><br></div><div>high=1000</div><div>low=1</div><div>tries=1</div><div><br></div>
<div>while high > low:</div><div> ave=(high+low)/2</div><div> print "My guess is", ave,</div><div> guess=int(raw_input("Please enter '-1','0',or '1'):"))</div><div>
print guess</div><div> if guess == 0:</div><div> print "That took 1", tries, "guesses."</div><div> </div><div> elif guess == -1: </div><div> print "I will guess lower."</div>
<div> elif guess == 1:</div><div> print "I will guess higher."</div><div> else:</div><div> print "Pick a number between 1 and 1000 and I will try to guess it"</div><div> print "in no more than 10 tries. After each guess, enter 0 if I"</div>
<div> print "got it right, -1 if I need to guess lower, and 1 if I need to"</div><div> print "guess higher."</div><div><br></div><div> main()</div><div> </div><div> </div>
<div> </div><div><br></div></div>