allnumbers=[] orden=[] newlist=[] new3list=[] new4list=[] i=0 file = open("Pega 4 Record.txt") line = file.read() listnumber = line.split() opciones=[] opciones1=[] resp="no" for k in range(0000,9999): if len(str(k))==1: allnumbers.append("000" + (str(k))) elif len(str(k))==2: allnumbers.append("00" + (str(k))) elif len(str(k))==3: allnumbers.append("0" + (str(k))) else: allnumbers.append((str(k))) for newnumber in allnumbers: orden.append(newnumber[0]) orden.append(newnumber[1]) orden.append(newnumber[2]) orden.append(newnumber[3]) orden.sort() newlist.append(orden[0]+orden[1]+orden[2]+orden[3]) orden=[] newlist.sort() for newnumber in listnumber: orden.append(newnumber[0]) orden.append(newnumber[1]) orden.append(newnumber[2]) orden.append(newnumber[3]) orden.sort() new3list.append(orden[0]+orden[1]+orden[2]+orden[3]) orden=[] new3list.sort() new2list = list(set(newlist)) new2list.sort() # a este punto solo ahi 714 numeros en los 1000 y uno de estos 714 numeros se va a dar con un 100% # elimina triples y dobles, ya no tendremos un 100% pero no quedaremos con un buen porciento de probabilidades doublebox=["0012", "0013", "0014", "0015", "0016", "0017", "0018", "0019", "0023", "0024", "0025", "0026", "0027", "0028", "0029", "0034", "0035", "0036", "0037", "0038", "0039", "0045", "0046", "0047", "0048", "0049", "0056", "0057", "0058", "0059", "0067", "0068", "0069", "0078", "0079", "0089", "0112", "0113", "0114", "0115", "0116", "0117", "0118", "0119", "0122", "0133", "0144", "0155", "0166", "0177", "0188", "0199", "0223", "0224", "0225", "0226", "0227", "0228", "0229", "0233", "0244", "0255", "0266", "0277", "0288", "0299", "0334", "0335", "0336", "0337", "0338", "0339", "0344", "0355", "0366", "0377", "0388", "0399", "0445", "0446", "0447", "0448", "0449", "0455", "0466", "0477", "0488", "0499", "0556", "0557", "0558", "0559", "0566", "0577", "0588", "0599", "0667", "0668", "0669", "0677", "0688", "0699", "0778", "0779", "0788", "0799", "0889", "0899", "1123", "1124", "1125", "1126", "1127", "1128", "1129", "1134", "1135", "1136", "1137", "1138", "1139", "1145", "1146", "1147", "1148", "1149", "1156", "1157", "1158", "1159", "1167", "1168", "1169", "1178", "1179", "1189", "1223", "1224", "1225", "1226", "1227", "1228", "1229", "1233", "1244", "1255", "1266", "1277", "1288", "1299", "1334", "1335", "1336", "1337", "1338", "1339", "1344", "1355", "1366", "1377", "1388", "1399", "1445", "1446", "1447", "1448", "1449", "1455", "1466", "1477", "1488", "1499", "1556", "1557", "1558", "1559", "1566", "1577", "1588", "1599", "1667", "1668", "1669", "1677", "1688", "1699", "1778", "1779", "1788", "1799", "1889", "1899", "2234", "2235", "2236", "2237", "2238", "2239", "2245", "2246", "2247", "2248", "2249", "2256", "2257", "2258", "2259", "2267", "2268", "2269", "2278", "2279", "2289", "2334", "2335", "2336", "2337", "2338", "2339", "2344", "2355", "2366", "2377", "2388", "2399", "2445", "2446", "2447", "2448", "2449", "2455", "2466", "2477", "2488", "2499", "2556", "2557", "2558", "2559", "2566", "2577", "2588", "2599", "2667", "2668", "2669", "2677", "2688", "2699", "2778", "2779", "2788", "2799", "2889", "2899", "3345", "3346", "3347", "3348", "3349", "3356", "3357", "3358", "3359", "3367", "3368", "3369", "3378", "3379", "3389", "3445", "3446", "3447", "3448", "3449", "3455", "3466", "3477", "3488", "3499", "3556", "3557", "3558", "3559", "3566", "3577", "3588", "3599", "3667", "3668", "3669", "3677", "3688", "3699", "3778", "3779", "3788", "3799", "3889", "3899", "4456", "4457", "4458", "4459", "4467", "4468", "4469", "4478", "4479", "4489", "4556", "4557", "4558", "4559", "4566", "4577", "4588", "4599", "4667", "4668", "4669", "4677", "4688", "4699", "4778", "4779", "4788", "4799", "4889", "4899", "5567", "5568", "5569", "5578", "5579", "5589", "5667", "5668", "5669", "5677", "5688", "5699", "5778", "5779", "5788", "5799", "5889", "5899", "6678", "6679", "6689", "6778", "6779", "6788", "6799", "6889", "6899", "7789", "7889", "7899"] ddoublebox=["0011", "0022", "0033", "0044", "0055", "0066", "0077", "0088", "0099", "1122", "1133", "1144", "1155", "1166", "1177", "1188", "1199", "2233", "2244", "2255", "2266", "2277", "2288", "2299", "3344", "3355", "3366", "3377", "3388", "3399", "4455", "4466", "4477", "4488", "4499", "5566", "5577", "5588", "5599", "6677", "6688", "6699", "7788", "7799", "8899"] triplebox=["0001", "0002", "0003", "0004", "0005", "0006", "0007", "0008", "0009", "0111", "0222", "0333", "0444", "0555", "0666", "0777", "0888", "0999", "1112", "1113", "1114", "1115", "1116", "1117", "1118", "1119", "1222", "1333", "1444", "1555", "1666", "1777", "1888", "1999", "2223", "2224", "2225", "2226", "2227", "2228", "2229", "2333", "2444", "2555", "2666", "2777", "2888", "2999", "3334", "3335", "3336", "3337", "3338", "3339", "3444", "3555", "3666", "3777", "3888", "3999", "4445", "4446", "4447", "4448", "4449", "4555", "4666", "4777", "4888", "4999", "5556", "5557", "5558", "5559", "5666", "5777", "5888", "5999", "6667", "6668", "6669", "6777", "6888", "6999", "7778", "7779", "7888", "7999", "8889", "8999"] quadbox=["0000", "1111", "2222", "3333", "4444", "5555", "6666", "7777", "8888", "9999"] # 4 tipos de numeros, cada uno disminuye la probabilidad del 100 porciento newbox=list(set(new2list)-set(ddoublebox)) newbox=list(set(newbox)-set(triplebox)) newbox=list(set(newbox)-set(quadbox)) #print(len(new3list)) #print(len(set(new3list))) a=list(set(newbox)-set(new3list)) #a=list(set(a)-set(doublebox)) #print(len(a)) a.sort() print("Nota Aclaratoria: El programa elimina variantes el cual el usuario no tiene control como numeros recientes que han salido," " esto dado que es poco probable que se repita pronto pero no imposible") while resp != "si": numbers=input("Escoja sus numeros posibles....separelos con comas ej: 1,2,0,4,6,7? ") bounder=input("Elimino sumas menores y mayores a.... ideales, 9,24? nota : 91% de los numeros que se dan estan entre estas linea ") hotnumber=numbers.split(",") bounders=bounder.split(",") hotnumber.sort() print ("Numeros que usted escogio " + str(hotnumber)) print ("Limitadores que usted escogio " + str(bounders)) resp=input("Verifique que los numeros esten correctos y sus limites? ") for h1 in hotnumber: for h2 in hotnumber: for h3 in hotnumber: for h4 in hotnumber: if int(h1)+int(h2)+int(h3)+int(h4)<=int(bounders[0]): i=i+1 elif int(h1)+int(h2)+int(h3)+int(h4)>=int(bounders[1]): i=i+1 else: opciones.append(h1+h2+h3+h4) opciones=list(set(opciones)) print ("Se eliminaron " + str(i) + " con su opciones de los bounders") for newnumber1 in opciones: orden.append(newnumber1[0]) orden.append(newnumber1[1]) orden.append(newnumber1[2]) orden.append(newnumber1[3]) orden.sort() opciones1.append(orden[0]+orden[1]+orden[2]+orden[3]) orden=[] opciones1=list(set(opciones1)) opciones1.sort() for item in opciones1: if item in a: new4list.append(item) new4list.sort() resp=input("Desea eliminar los 'double Pair' hasta ahora tienes unas " + str(len(new4list)) + " opciones , si elige esta opcion su probabilidades bajan un 50.2% ?") if resp=="si": new5list=list(set(new4list)-set(doublebox)) else: new5list=new4list for z in new5list: print (z) print("Usted termino con unas " + str(len(new5list))+ " opciones")
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question