also erstmal bin ich echt neu im game, deswegen please do not jugde

& zwar habe ich 2 Funktionen, bei der ersten Funktionen ist eine while schleife & wenn das zutrifft, wird ein parameter an die 2. Funktion übergeben & der berechnet dann was & returned das, allerdings funktioniert eben das nicht.. jemand eine ahnung warum?
def main(end2):
x = 0
while x<3:
end_of_month = current_savings + r #1000 + 4% Rendite
end1 = end_of_month + current_savings + ((end_of_month + current_savings )*(0.04/12)) #1003.333 + 1000 + (1003.333 + 1000) * 0.04/12
end2= end1 + 0.01 * monthly_salary #2110
berechnen (end2, end_of_month)
#end3 = end2 + current_savings + ((end_of_month + current_savings )*(0.04/12)
main(current_savings, r, monthly_salary)
def berechnen(end2, end_of_month):
end2 = end2 + current_savings + ((end_of_month + current_savings )*(0.04/12)
return end2
--- das ist das Problem:
runfile('C:/Users/mine-/AppData/Local/Temp/ps1a.py', wdir='C:/Users/mine-/AppData/Local/Temp')
File "C:\Users\mine-\AppData\Local\Temp\ps1a.py", line 53
return end3
^
SyntaxError: invalid syntax