Created
August 1, 2018 16:22
-
-
Save XChrisUnknownX/b4045d86b7789dd7cf1165f30dad6bb3 to your computer and use it in GitHub Desktop.
roulette.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
roulettenumbers = ["1","2","3","4","5","6","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","0","00"] | |
#roulette numbers is a defunct list. | |
spins = 0 | |
import time | |
import random | |
spacebar = " " | |
one = "1" | |
two = "2" | |
three = "3" | |
four = "4" | |
five = "5" | |
six = "6" | |
seven = "7" | |
eight = "8" | |
nine = "9" | |
ten = "10" | |
eleven = "11" | |
twelve = "12" | |
thirteen = "13" | |
fourteen = "14" | |
fifteen = "15" | |
sixteen = "16" | |
seventeen = "17" | |
eighteen = "18" | |
nineteen = "19" | |
twenty = "20" | |
twentyone = "21" | |
twentytwo = "22" | |
twentythree = "23" | |
twentyfour = "24" | |
twentyfive = "25" | |
twentysix = "26" | |
twentyseven = "27" | |
twentyeight = "28" | |
twentynine = "29" | |
thirty = "30" | |
thirtyone = "31" | |
thirtytwo = "32" | |
thirtythree = "33" | |
thirtyfour = "34" | |
thirtyfive = "35" | |
thirtysix = "36" | |
zero = "0" | |
doublezero = "00" | |
roulettenumbers = [zero,doublezero,one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen,eighteen,nineteen,twenty,twentyone,twentytwo,twentythree,twentyfour,twentyfive,twentysix,twentyseven,twentyeight,twentynine,thirty,thirtyone,thirtytwo,thirtythree,thirtyfour,thirtyfive,thirtysix] | |
ones = 0 | |
twos = 0 | |
threes = 0 | |
fours = 0 | |
fives = 0 | |
sixs = 0 | |
sevens = 0 | |
eights = 0 | |
nines = 0 | |
tens = 0 | |
elevens = 0 | |
twelves = 0 | |
thirteens = 0 | |
fourteens = 0 | |
fifteens = 0 | |
sixteens = 0 | |
seventeens = 0 | |
eighteens = 0 | |
nineteens = 0 | |
twentys = 0 | |
twentyones = 0 | |
twentytwos = 0 | |
twentythrees = 0 | |
twentyfours = 0 | |
twentyfives = 0 | |
twentysixs = 0 | |
twentysevens = 0 | |
twentyeights = 0 | |
twentynines = 0 | |
thirtys = 0 | |
thirtyones = 0 | |
thirtytwos = 0 | |
thirtythrees = 0 | |
thirtyfours = 0 | |
thirtyfives = 0 | |
thirtysixs = 0 | |
zeros = 0 | |
doublezeros = 0 | |
while True: | |
choice = random.choice(roulettenumbers) | |
print("Computer chose" + spacebar + choice + ".") | |
print() | |
if choice == one: | |
ones += 1 | |
elif choice == two: | |
twos += 1 | |
elif choice == three: | |
threes += 1 | |
elif choice == four: | |
fours += 1 | |
elif choice == five: | |
fives += 1 | |
elif choice == six: | |
sixs += 1 | |
elif choice == seven: | |
sevens += 1 | |
elif choice == eight: | |
eights += 1 | |
elif choice == nine: | |
nines += 1 | |
elif choice == ten: | |
tens += 1 | |
elif choice == eleven: | |
elevens += 1 | |
elif choice == twelve: | |
twelves += 1 | |
elif choice == thirteen: | |
thirteens += 1 | |
elif choice == fourteen: | |
fourteens += 1 | |
elif choice == fifteen: | |
fifteens += 1 | |
elif choice == sixteen: | |
sixteens += 1 | |
elif choice == seventeen: | |
seventeens += 1 | |
elif choice == eighteen: | |
eighteens += 1 | |
elif choice == nineteen: | |
nineteens += 1 | |
elif choice == twenty: | |
twentys += 1 | |
elif choice == twentyone: | |
twentyones += 1 | |
elif choice == twentytwo: | |
twentytwos += 1 | |
elif choice == twentythree: | |
twentythrees += 1 | |
elif choice == twentyfour: | |
twentyfours += 1 | |
elif choice == twentyfive: | |
twentyfives += 1 | |
elif choice == twentysix: | |
twentysixs += 1 | |
elif choice == twentyseven: | |
twentysevens += 1 | |
elif choice == twentyeight: | |
twentyeights += 1 | |
elif choice == twentynine: | |
twentynines += 1 | |
elif choice == thirty: | |
thirtys += 1 | |
elif choice == thirtyone: | |
thirtyones += 1 | |
elif choice == thirtytwo: | |
thirtytwos += 1 | |
elif choice == thirtythree: | |
thirtythrees += 1 | |
elif choice == thirtyfour: | |
thirtyfours += 1 | |
elif choice == thirtyfive: | |
thirtyfives += 1 | |
elif choice == thirtysix: | |
thirtysixs += 1 | |
elif choice == zero: | |
zeros += 1 | |
elif choice == doublezero: | |
doublezeros += 1 | |
else: | |
print("coding error") | |
oness = str(ones) | |
twoss = str(twos) | |
threess = str(threes) | |
fourss = str(fours) | |
fivess = str(fives) | |
sixss = str(sixs) | |
sevenss = str(sevens) | |
eightss = str(eights) | |
niness = str(nines) | |
tenss = str(tens) | |
elevenss = str(elevens) | |
twelvess = str(twelves) | |
thirteenss = str(thirteens) | |
fourteenss = str(fourteens) | |
fifteenss = str(fifteens) | |
sixteenss = str(sixteens) | |
seventeenss = str(seventeens) | |
eighteenss = str(eighteens) | |
nineteenss = str(nineteens) | |
twentyss = str(twentys) | |
twentyoness = str(twentyones) | |
twentytwoss = str(twentytwos) | |
twentythreess = str(twentythrees) | |
twentyfourss = str(twentyfours) | |
twentyfivess = str(twentyfives) | |
twentysixss = str(twentysixs) | |
twentysevenss = str(twentysevens) | |
twentyeightss = str(twentyeights) | |
twentyniness = str(twentynines) | |
thirtyss = str(thirtys) | |
thirtyoness = str(thirtyones) | |
thirtytwoss = str(thirtytwos) | |
thirtythreess = str(thirtythrees) | |
thirtyfourss = str(thirtyfours) | |
thirtyfivess = str(thirtyfives) | |
thirtysixss = str(thirtysixs) | |
zeross = str(zeros) | |
doublezeross = str(doublezeros) | |
spins += 1 | |
spinss = str(spins) | |
hasbeenchosen = " has been chosen " | |
times = " times." | |
print(one + hasbeenchosen + oness + times) | |
print(two + hasbeenchosen + twoss + times) | |
print(three + hasbeenchosen + threess + times) | |
print(four + hasbeenchosen + fourss + times) | |
print(five + hasbeenchosen + fivess + times) | |
print(six + hasbeenchosen + sixss + times) | |
print(seven + hasbeenchosen + sevenss + times) | |
print(eight + hasbeenchosen + eightss + times) | |
print(nine + hasbeenchosen + niness + times) | |
print(ten + hasbeenchosen + tenss + times) | |
print(eleven + hasbeenchosen + elevenss + times) | |
print(twelve + hasbeenchosen + twelvess + times) | |
print(thirteen + hasbeenchosen + thirteenss + times) | |
print(fourteen + hasbeenchosen + fourteenss + times) | |
print(fifteen + hasbeenchosen + fifteenss + times) | |
print(sixteen+hasbeenchosen+sixteenss+times) | |
print(seventeen+hasbeenchosen+seventeenss+times) | |
print(eighteen + hasbeenchosen + eighteenss + times) | |
print(nineteen + hasbeenchosen + nineteenss + times) | |
print(twenty + hasbeenchosen + twentyss + times) | |
print(twentyone+hasbeenchosen+twentyoness+times) | |
print(twentytwo+hasbeenchosen+twentytwoss+times) | |
print(twentythree+hasbeenchosen+twentythreess+times) | |
print(twentyfour+hasbeenchosen+twentyfourss+times) | |
print(twentyfive+hasbeenchosen+twentyfivess+times) | |
print(twentysix+hasbeenchosen+twentysixss+times) | |
print(twentyseven+hasbeenchosen+twentysevenss+times) | |
print(twentyeight+hasbeenchosen+twentyeightss+times) | |
print(twentynine+hasbeenchosen+twentyniness+times) | |
print(thirty+hasbeenchosen+thirtyss+times) | |
print(thirtyone+hasbeenchosen+thirtyoness+times) | |
print(thirtytwo+hasbeenchosen+thirtytwoss+times) | |
print(thirtythree+hasbeenchosen+thirtythreess+times) | |
print(thirtyfour+hasbeenchosen+thirtyfourss+times) | |
print(thirtyfive+hasbeenchosen+thirtyfivess+times) | |
print(thirtysix+hasbeenchosen+thirtysixss+times) | |
print(zero+hasbeenchosen+zeross+times) | |
print(doublezero+hasbeenchosen+doublezeross+times) | |
print("Program has completed " + spinss + " spins.") | |
time.sleep(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment