צהריים טובים,
יכול להיות שיש שגיאה בטסטר של שאלה 2 - RevGen?
זה עובד לי כשאני משתמש ב-RevGen עם הפונ' SomePairs שנכתבה בסעיף ב' הקודם, אך בהרצת ה-test מופיעה השגיאה:
if {(x,y) for (x,y) in RevGen(f)} != {(6, 3), (4, 2), (0, 0), (2, 1)}: #order of pairs does not matter
File "C:\Users\User\Downloads\5\skeleton5.py", line 286, in <setcomp>
if {(x,y) for (x,y) in RevGen(f)} != {(6, 3), (4, 2), (0, 0), (2, 1)}: #order of pairs does not matter
File "C:\Users\User\Downloads\5\skeleton5.py", line 139, in RevGen
(i,j)=next(a)
TypeError: function object is not an iterator
תודה!