Hello guys, I started doing the course as a complete beginner to programming and there is one pretty confusing thing. It has to do with arguments in this course. I attached a screen shot, and the confusement in on lines 26,27. I understand that after the function there are the arguents in the paratheses. Arguments dont really store any value as variables, so there are there just as identification to which value to attach to each statement in the function ,right ? If this is true, then what I dont understand, if I was to do trip_cost(10,15,10) under the function what it would do exactly ? It would assign values like…10 to city, 15 to day, and 10 to spending_money ? But those functions already have values stored because of the return no ? Also when I do the + spending_money thing, how does python know it is not the variable, and which value would it use ? Would it use a value from here > trip_cost(10,15,10) - if I was to create this ?
Also, if I dont assisn all three arguments, it does not work, how come ? It says this:
trip_cost(‘Los Angeles’, 3, 0) raised an error: unsupported operand type(s) for +: ‘int’ and ‘NoneType’
Thank you for you help guys :))