Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. from random import shuffle
  2.  
  3. stdin = open('leccion' + input() + '.txt')
  4. repeat = stdin.read().split('\n')
  5. repeat.pop()
  6. for i in range(len(repeat)):
  7. repeat[i] = repeat[i].split()
  8. new_repeat = []
  9. while repeat:
  10. shuffle(repeat)
  11. for elem in repeat:
  12. print(elem[1])
  13. if input() != elem[0]:
  14. new_repeat.append(elem)
  15. print('WRONG!!!\nThe right answer is ', elem[0])
  16. repeat = new_repeat[:]
  17. new_repeat = []
  18. print('Well done!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement