<HTML>
<HEAD>
<TITLE>Help With Rock, Paper Scissor Game</TITLE>
</HEAD>
<BODY>
<FONT SIZE="1"><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:8.5pt'>This is the template that we are suppose to use while doing the program, I am a beginner to this programming language and really have no clue what I am doing<BR>
<BR>
<BR>
import random<BR>
#table of winning plays<BR>
win_play_for = {&#8217;r&#8217;:&#8217;p&#8217;, &#8217;p&#8217;:&#8217;s&#8217;, &#8217;s&#8217;:&#8217;r&#8217;}<BR>
<BR>
#scoring results<BR>
player_score = 0<BR>
mach_score = 0<BR>
<BR>
#keep track of users&#8217;last plays<BR>
#assume initially an even distribution<BR>
hist = [&#8217;r&#8217;, &#8217;p&#8217;, &#8217;s&#8217;, &#8217;r&#8217;, &#8217;p&#8217;, &#8217;s&#8217;, &#8217;r&#8217;, &#8217;p&#8217;, &#8217;s&#8217;]<BR>
next = 0 #index of where to put next user play<BR>
<BR>
while True:<BR>
#guess what user play will be based on past<BR>
#behavior. Pick a machine play to win based<BR>
#on guess<BR>
<BR>
#get user&#8217;s play<BR>
user_play = raw_input(&quot;what&#8217;s your play (r|p|s)? &quot;)<BR>
#if the user does not respond with one of those break<BR>
<BR>
#otherwise<BR>
#update history of user plays<BR>
<BR>
#determine winner for current play or draw<BR>
#print results of current play and scores so far<BR>
<BR>
<BR>
NOW THIS IS WHAT I HAVE SO FAR, AND THESE ARE ALL JUMBLE AROUND BECAUSE I HAVE NO CLUE WHERE THEY ARE SUPPOSE TO GO PLZ HELP<BR>
<BR>
<BR>
import random<BR>
<BR>
#table of winning plays<BR>
win_play_for = {'r':'p', 'p':'s', 's':'r'}<BR>
<BR>
<BR>
#scoring results<BR>
player_score = 0<BR>
mach_score = 0<BR>
<BR>
#kepp track of users' last plays<BR>
#assume initially an even distribution<BR>
hist = ['r', 'p', 's', 'r', 'p', 's', 'r', 'p', 's']<BR>
next = 0 #index of where to put next user play<BR>
<BR>
<BR>
while True:<BR>
&nbsp;&nbsp;&nbsp;&nbsp;hist = ['r', 'p', 's', 'r', 'p', 's', 'r', 'p', 's']<BR>
&nbsp;&nbsp;&nbsp;&nbsp;next = 0<BR>
&nbsp;&nbsp;&nbsp;&nbsp;guess = random_choice(hist)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;len (hist)<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;#gets user's play<BR>
&nbsp;&nbsp;&nbsp;&nbsp;user_play = raw_input(&quot;What's your play (r|p|s)?&quot;)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;hist[next] = user_play<BR>
&nbsp;&nbsp;&nbsp;&nbsp;next = next + 1<BR>
&nbsp;&nbsp;&nbsp;&nbsp;if next == len(hist):<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next = 0<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;user_play == win_play_for(mach_play)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;mach_play == win_play_for(user_play)<BR>
<BR>
</SPAN></FONT></FONT>
</BODY>
</HTML>