Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. while q <= len(atom):
  2. c = atom[q] #list of atoms
  3. for s in range(0,len(x)-1):
  4. atm = x[s] #Check if all atoms are found
  5. if c == atm:
  6. cnt += 1
  7. if cnt == len(x)-1:
  8. print('All atoms are true')
  9. break
  10.  
  11. for k in range(0,len(A)): #check each elememt of the list with the atom
  12. ts = A[k] #string
  13. for b in range(0,len(ts)): #check each particular char in each string
  14. if c == ts[b]:
  15. if ts[b] == x: #If a solution is found done
  16. print('Found',ts[b])
  17. break
  18. else: #get rid of the atoms in the clause that are true
  19. line = A[k]
  20. line = line.replace(c, '')
  21. A[k] = line
  22. print('ye')
  23. print(A[k])
  24. if len(A[k]) == 1:
  25. atom.append(ts[1])
  26. q += 1
  27. atom[q] =A[k]
  28. print(atom)
  29. print('yes')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement