<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Hi all,</DIV>
<DIV> </DIV>
<DIV>What's the invalid syntax? Here is the code:</DIV>
<DIV>import random<BR>hand = {<BR> '0' :
["Ace"]<BR> '1' : ["Two"]<BR> '2' :
["Three"]<BR> '3' : ["Four"]<BR> '4' :
["Five"]<BR> '5' : ["Six"]<BR> '6' :
["Seven"]<BR> '7' : ["Eight"]<BR> '8' :
["Nine"]<BR> '9' : ["Ten"]<BR> '10' :
["Jack"]<BR> '11' : ["Queen"]<BR> '12' :
["King"]<BR> }<BR>types = {<BR> '0' :
["Diamonds"]<BR> '1' : ["Hearts"]<BR> '2' :
["Spades"]<BR> '3' : ["Clubs"]<BR>
}<BR>playercards = [a,b,c,d,e]<BR>t = [t1,t2,t3,t4,t5]<BR>def
menu():<BR> print "1. Deal a hand"<BR> print
"2. Exit"</DIV>
<DIV> </DIV>
<DIV>def option():<BR> return int(raw_input("Option: "))</DIV>
<DIV> </DIV>
<DIV>def deal():<BR> playercards =
random.choice(13)<BR> t = random.choice(4)</DIV>
<DIV> </DIV>
<DIV>print "The Five Card Dealer"<BR>print "By Nathan Pinno"<BR>while
1:<BR> menu()<BR> opt =
option()<BR> while opt ==
1:<BR>
deal()<BR> for index in
range(len(playercards)):<BR>
if index ==
0:<BR>
index =
hand['0']<BR>
if index ==
1:<BR>
index =
hand['1']<BR>
if index ==
2:<BR>
index =
hand['2']<BR>
if index ==
3:<BR>
index =
hand['3']<BR>
if index ==
4:<BR>
index =
hand['4']<BR>
if index ==
5:<BR>
index =
hand['5']<BR>
if index ==
6:<BR>
index =
hand['6']<BR>
if index ==
7:<BR>
index =
hand['7']<BR>
if index ==
8:<BR>
index =
hand['8']<BR>
if index ==
9:<BR>
index =
hand['9']<BR>
if index ==
10:<BR>
index =
hand['10']<BR>
if index ==
11:<BR>
index =
hand['11']<BR>
if index ==
12:<BR>
index = hand['12']<BR> for indice in
range(len(t)):<BR>
if indice ==
0:<BR>
indice =
types['0']<BR>
if indice ==
1:<BR>
indice =
types['1']<BR>
if indice ==
2:<BR>
indice =
types['2']<BR>
if indice ==
3:<BR>
indice = types['3']<BR> print a," of
",t1, b," of ",t2, c," of ",t3, d," of ",t4, e," of ",t5<BR>
while opt == 2:<BR> break<BR>print
"Goodbye."<BR></DIV>
<DIV>If it helps it highlighted the ' after 1 in the hand dictionary.</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Nathan Pinno,<BR>Crew, Camrose McDonalds and owner/operator of
Zoffee</DIV></BODY></HTML>