t339.trans 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. Module(body=[Import(names=[alias(name='re',
  2. asname=None)]),
  3. Assign(targets=[Name(id='val',
  4. ctx=Store())],
  5. value=Call(func=Attribute(value=Name(id='re',
  6. ctx=Load()),
  7. attr='findall',
  8. ctx=Load()),
  9. args=[Str(s='From'),
  10. Str(s='dlkjdsljkdlkdsjlk')],
  11. keywords=[],
  12. starargs=None,
  13. kwargs=None)),
  14. Print(dest=None,
  15. values=[Name(id='val',
  16. ctx=Load())],
  17. nl=True),
  18. If(test=Compare(left=Call(func=Name(id='len',
  19. ctx=Load()),
  20. args=[Name(id='val',
  21. ctx=Load())],
  22. keywords=[],
  23. starargs=None,
  24. kwargs=None),
  25. ops=[Eq()],
  26. comparators=[Num(n=0)]),
  27. body=[Print(dest=None,
  28. values=[Str(s='Correct 1')],
  29. nl=True)],
  30. orelse=[Print(dest=None,
  31. values=[Str(s='InCorrect 1')],
  32. nl=True)]),
  33. Assign(targets=[Name(id='val',
  34. ctx=Store())],
  35. value=Call(func=Attribute(value=Name(id='re',
  36. ctx=Load()),
  37. attr='findall',
  38. ctx=Load()),
  39. args=[Str(s='From'),
  40. Str(s='dlkjd From kdsjlk')],
  41. keywords=[],
  42. starargs=None,
  43. kwargs=None)),
  44. Print(dest=None,
  45. values=[Name(id='val',
  46. ctx=Load())],
  47. nl=True),
  48. If(test=Compare(left=Call(func=Name(id='len',
  49. ctx=Load()),
  50. args=[Name(id='val',
  51. ctx=Load())],
  52. keywords=[],
  53. starargs=None,
  54. kwargs=None),
  55. ops=[Eq()],
  56. comparators=[Num(n=1)]),
  57. body=[Print(dest=None,
  58. values=[Str(s='Correct 2')],
  59. nl=True)],
  60. orelse=[Print(dest=None,
  61. values=[Str(s='InCorrect 2')],
  62. nl=True)]),
  63. Assign(targets=[Name(id='val',
  64. ctx=Store())],
  65. value=Call(func=Attribute(value=Name(id='re',
  66. ctx=Load()),
  67. attr='findall',
  68. ctx=Load()),
  69. args=[Str(s='From'),
  70. Str(s='From dlkjd From kdsjlk')],
  71. keywords=[],
  72. starargs=None,
  73. kwargs=None)),
  74. Print(dest=None,
  75. values=[Name(id='val',
  76. ctx=Load())],
  77. nl=True),
  78. If(test=Compare(left=Call(func=Name(id='len',
  79. ctx=Load()),
  80. args=[Name(id='val',
  81. ctx=Load())],
  82. keywords=[],
  83. starargs=None,
  84. kwargs=None),
  85. ops=[Eq()],
  86. comparators=[Num(n=2)]),
  87. body=[Print(dest=None,
  88. values=[Str(s='Correct 3')],
  89. nl=True)],
  90. orelse=[Print(dest=None,
  91. values=[Str(s='InCorrect 3')],
  92. nl=True)]),
  93. Assign(targets=[Name(id='val',
  94. ctx=Store())],
  95. value=Call(func=Attribute(value=Name(id='re',
  96. ctx=Load()),
  97. attr='findall',
  98. ctx=Load()),
  99. args=[Str(s='[0-9]+/[0-9]+'),
  100. Str(s='1/2 1/3 3/4 1/8 fred 10/0')],
  101. keywords=[],
  102. starargs=None,
  103. kwargs=None)),
  104. Print(dest=None,
  105. values=[Name(id='val',
  106. ctx=Load())],
  107. nl=True),
  108. If(test=Compare(left=Call(func=Name(id='len',
  109. ctx=Load()),
  110. args=[Name(id='val',
  111. ctx=Load())],
  112. keywords=[],
  113. starargs=None,
  114. kwargs=None),
  115. ops=[Eq()],
  116. comparators=[Num(n=5)]),
  117. body=[Print(dest=None,
  118. values=[Str(s='Correct 4')],
  119. nl=True)],
  120. orelse=[Print(dest=None,
  121. values=[Str(s='InCorrect 4')],
  122. nl=True)]),
  123. Assign(targets=[Name(id='val',
  124. ctx=Store())],
  125. value=Call(func=Attribute(value=Name(id='re',
  126. ctx=Load()),
  127. attr='search',
  128. ctx=Load()),
  129. args=[Str(s='From'),
  130. Str(s='dlkjdsljkdlkdsjlk')],
  131. keywords=[],
  132. starargs=None,
  133. kwargs=None)),
  134. If(test=Compare(left=Name(id='val',
  135. ctx=Load()),
  136. ops=[Is()],
  137. comparators=[Name(id='None',
  138. ctx=Load())]),
  139. body=[Print(dest=None,
  140. values=[Str(s='Correct 5')],
  141. nl=True)],
  142. orelse=[Print(dest=None,
  143. values=[Str(s='InCorrect 5'),
  144. Name(id='val',
  145. ctx=Load())],
  146. nl=True)]),
  147. Assign(targets=[Name(id='val',
  148. ctx=Store())],
  149. value=Call(func=Attribute(value=Name(id='re',
  150. ctx=Load()),
  151. attr='search',
  152. ctx=Load()),
  153. args=[Str(s='From'),
  154. Str(s='dlkjd From kdsjlk')],
  155. keywords=[],
  156. starargs=None,
  157. kwargs=None)),
  158. If(test=Compare(left=Name(id='val',
  159. ctx=Load()),
  160. ops=[IsNot()],
  161. comparators=[Name(id='None',
  162. ctx=Load())]),
  163. body=[Print(dest=None,
  164. values=[Str(s='Correct 6')],
  165. nl=True)],
  166. orelse=[Print(dest=None,
  167. values=[Str(s='InCorrect 6'),
  168. Name(id='val',
  169. ctx=Load())],
  170. nl=True)]),
  171. Assign(targets=[Name(id='val',
  172. ctx=Store())],
  173. value=Call(func=Attribute(value=Name(id='re',
  174. ctx=Load()),
  175. attr='search',
  176. ctx=Load()),
  177. args=[Str(s='From'),
  178. Str(s='From dlkjd From kdsjlk')],
  179. keywords=[],
  180. starargs=None,
  181. kwargs=None)),
  182. If(test=Compare(left=Name(id='val',
  183. ctx=Load()),
  184. ops=[IsNot()],
  185. comparators=[Name(id='None',
  186. ctx=Load())]),
  187. body=[Print(dest=None,
  188. values=[Str(s='Correct 7')],
  189. nl=True)],
  190. orelse=[Print(dest=None,
  191. values=[Str(s='InCorrect 7'),
  192. Name(id='val',
  193. ctx=Load())],
  194. nl=True)]),
  195. Assign(targets=[Name(id='val',
  196. ctx=Store())],
  197. value=Call(func=Attribute(value=Name(id='re',
  198. ctx=Load()),
  199. attr='match',
  200. ctx=Load()),
  201. args=[Str(s='From'),
  202. Str(s='dlkjdsljkdlkdsjlk')],
  203. keywords=[],
  204. starargs=None,
  205. kwargs=None)),
  206. If(test=Compare(left=Name(id='val',
  207. ctx=Load()),
  208. ops=[Is()],
  209. comparators=[Name(id='None',
  210. ctx=Load())]),
  211. body=[Print(dest=None,
  212. values=[Str(s='Correct 8')],
  213. nl=True)],
  214. orelse=[Print(dest=None,
  215. values=[Str(s='InCorrect 8'),
  216. Name(id='val',
  217. ctx=Load())],
  218. nl=True)]),
  219. Assign(targets=[Name(id='val',
  220. ctx=Store())],
  221. value=Call(func=Attribute(value=Name(id='re',
  222. ctx=Load()),
  223. attr='match',
  224. ctx=Load()),
  225. args=[Str(s='From'),
  226. Str(s='dlkjd From kdsjlk')],
  227. keywords=[],
  228. starargs=None,
  229. kwargs=None)),
  230. If(test=Compare(left=Name(id='val',
  231. ctx=Load()),
  232. ops=[Is()],
  233. comparators=[Name(id='None',
  234. ctx=Load())]),
  235. body=[Print(dest=None,
  236. values=[Str(s='Correct 9')],
  237. nl=True)],
  238. orelse=[Print(dest=None,
  239. values=[Str(s='InCorrect 9'),
  240. Name(id='val',
  241. ctx=Load())],
  242. nl=True)]),
  243. Assign(targets=[Name(id='val',
  244. ctx=Store())],
  245. value=Call(func=Attribute(value=Name(id='re',
  246. ctx=Load()),
  247. attr='match',
  248. ctx=Load()),
  249. args=[Str(s='From'),
  250. Str(s='From dlkjd From kdsjlk')],
  251. keywords=[],
  252. starargs=None,
  253. kwargs=None)),
  254. If(test=Compare(left=Name(id='val',
  255. ctx=Load()),
  256. ops=[IsNot()],
  257. comparators=[Name(id='None',
  258. ctx=Load())]),
  259. body=[Print(dest=None,
  260. values=[Str(s='Correct 10')],
  261. nl=True)],
  262. orelse=[Print(dest=None,
  263. values=[Str(s='InCorrect 10'),
  264. Name(id='val',
  265. ctx=Load())],
  266. nl=True)])])