May-16-2017, 07:47 PM
(This post was last modified: May-16-2017, 08:21 PM by sparkz_alot.)
I'm trying to make a lottery ticket simulator but i have one issue...
i want the program not to print only Names, but surnames as well right after the names...
But it gives me this error:
i Do really appreciate it! Thank you :P
i want the program not to print only Names, but surnames as well right after the names...
But it gives me this error:
Error:Traceback (most recent call last):
File "C:\Users\spale\Desktop\SandBox.py", line 8, in <module>
Winners1 = random.choice(Names,Surnames)
TypeError: choice() takes 2 positional arguments but 3 were given
How do i fix this ???import random print("\nWinners of todays lottery are...") Names = ["Adolf","Tomas","Ben","Daniel","Alex","Samantha","Nicola","Angel","Blake","Guy","John","David","Julia","Romeo","Elizabeth","Jasmin","Adam","Eva","Sonia","Malika","Trump"] Surnames = ["Hitler","Spalek","Weird","Rowland","Frosbrook","Chandler","Smith","Who","Jones","Somebody","English","Okwiet","Trump","Donaldson","Jackson","Minerson","Slavik"] Winners1 = random.choice(Names,Surnames) Winners2 = random.choice(Names,Surnames) Winners3 = random.choice(Names,Surnames) def Winners(): print(Winners1) print(Winners2) print(Winners3) Winners()Thank you for taking your time to help me sort out the issue!
i Do really appreciate it! Thank you :P