Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. import random
  2. arr = [1,12,2,3,1,1,2,3,1,3,4,3,1,5,0,3,2,1,10,19,1,19,5,23,2,23,6,27,1,27,5,31,2,6,31,35,1,5,35,39,2,39,9,43,1,43,5,47,1,10,47,51,1,51,6,55,1,55,10,59,1,59,6,63,2,13,63,67,1,9,67,71,2,6,71,75,1,5,75,79,1,9,79,83,2,6,83,87,1,5,87,91,2,6,91,95,2,95,9,99,1,99,6,103,1,103,13,107,2,13,107,111,2,111,10,115,1,115,6,119,1,6,119,123,2,6,123,127,1,127,5,131,2,131,6,135,1,135,2,139,1,139,9,0,99,2,14,0,0]
  3.  
  4. list1=[]
  5. for i in range(0,99):
  6. list1.append(i)
  7. list2=[]
  8. for i in range(0,99):
  9. list2.append(i)
  10. noun= 0
  11. verb= 0
  12. opcode = 0
  13. iterCounter = 0
  14.  
  15. while arr[0] != 19690720:
  16. iterCounter+=1
  17. print(arr[0])
  18. if iterCounter > 99:
  19. random.shuffle(list1)
  20. random.shuffle(list2)
  21. iterCounter=0
  22. for (a, b) in zip(list1, list2):
  23. noun = a
  24. verb = b
  25. arr[opcode+4] = a
  26. arr[opcode+4+4] = b
  27. while arr[opcode] != 99:
  28. if arr[opcode] == 1:
  29. arr[arr[opcode+3]] = arr[arr[opcode+1]] + arr[arr[opcode+2]]
  30. opcode+=4
  31. if arr[opcode] == 2 and firstInteger == False:
  32. arr[arr[opcode+3]] = arr[arr[opcode+1]] * arr[arr[opcode+2]]
  33. opcode+=4
  34.  
  35.  
  36.  
  37.  
  38. if arr[opcode] == 99:
  39. print("Ended")
  40. print(arr)
  41. print(noun)
  42. print(verb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement