0
whats the problem?
money1 = 100 money2 = 100 def moneyTransferFrom1To2(x): money1 - x money2 + x print (str(money1) + " , " + str(money2)) moneyTransferFrom1To2(30) print (str(money1) + " , " + str(money2))
4 Respuestas
0
ty ,but what does the 'global' do?
does it let you use the variables? like 'public' in java?
0
~ swim ~ , you are right! but in this specific situation the code is really short and orginized , i dont think saving the code and sharing it in necesary...
by the names of the few variables you can assume the code is for transfering "money" from one variable to the other.