<div>Hello all, </div><div>I am a beginner to python and I am trying to make a simple program that takes in some names as input into a list and then randomly picks a vaule from that list as a winner.</div><div> </div><div>
Here is the code:</div><div> </div><div>import random</div><div> </div><div>choice = None</div><div> </div><div>names = [ ]</div><div> </div><div>while choice != &quot;0&quot;:<br>    print(<br>        &quot;&quot;&quot;<br>
        0 - Exit<br>        1 - Enter a name<br>        2 - Pick a winner<br>        &quot;&quot;&quot;)<br>    choice = input(&quot;Choice: &quot;)<br>    print()</div><div> </div><div>    if choice == &quot;0&quot;:<br>
        print (&quot;Goodbye.&quot;)</div><div> </div><div>    elif choice == &quot;1&quot;:<br>        name = input(&quot;Please enter a name: &quot;)<br>        names.append(name)<br>        print (names, &quot;have been entered.&quot;)</div>
<div> </div><div>    elif choice == &quot;2&quot;:<br>        pick = len(names)<br>        win_number =random.randint(0,pick)<br>        print (names[win_number], &quot; is the winner!&quot;)</div><div> </div><div>input(&quot;/n/nPress enter to exit.&quot;)<br>
        </div><div> </div><div>First problem, sometimes I get a error where the value is out of range.  Problem becuase of the way I set up the random value.</div><div>Second problem, but not a big one, is when I print the lists of names as they are entered, I get quotations around the name.</div>
<div> </div><div>I&#39;m sur I am over thinking this, but any help would be great.</div><div> </div><div>Thanks</div>