Function() missing 2 required positional arguments

print(function())
TypeError: function() missing 2 required positional arguments: ‘city1’ and ‘city2’

i wanna find wich city incure the largest opportunity cost

def function(city1, city2):
    tra_city1 = 200000
    tra_city2 = 500000
    price_city1 = 15
    price_city2 = 25
    time_city1 = 30
    time_city2= 30

    city1 = (tra_city1 * price_city1 * (time_city1 / 60))
    city2 = (tra_city2 * price_city2 * (time_city2 / 60))
    
    if city1 == city2:
        print("neither")
    elif city1 >= city2:
        print("boston has the largest oppurtunity cost")
    else: 
         print("los angeles has the largest oppurtunity cost")
   
    return function
print(function())

If you want to have function(), you could eliminate the parameters, and have
def function():
instead of
def function(city1, city2):

alternative

Instead, you can change the function call to have arguments, so
change
print(function())
to
print(function("Boston", "Los Angeles"))

but then I’d recommend changing some lines inside the function to use the city1 and city2 parameters:

    if city1 == city2:
        print("neither")
    elif city1 >= city2:
        print(city1 + " has the largest oppurtunity cost")
    else: 
         print(city2 + " has the largest oppurtunity cost")

Also, why does your function have a return?
What are you trying to return?

it works thank you, i want to find the largest opportunity cost between La and Boston
when I tried to input values it doesn’t work