2017-09-13 90 views
0

寫這個功能如何代表python3此代碼它是用Python編寫的2需要幫助在Python 3

def transform(x, y , (a, b, c, d, e, f)=matrix): 
     return a*x + b*y + c, d*x + e*y + f 

錯誤

def transform(x, y , (a, b, c, d, e, f)=matrix): 
        ^
SyntaxError: invalid syntax 

更多即將

+1

@jonrsharpe我剛剛做到了。每天學習一些新東西:) – TemporalWolf

回答

-2
def transform(x, y, matrix): 
    (a, b, c, d, e, f) = matrix 
    return a*x + b*y + c, d*x + e*y + f 
+0

請注意:1.代碼唯一的答案不被認爲是有用的; 2.如果發佈自我回答的問題,你可以同時發佈問答。和3.在發佈之前,你仍然需要做基本的檢查。 – jonrsharpe