Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Nick Jahanshahi1,499 Points
What does split_check have ‘total’ in parenthesis but we never use total again?
I though we have to use the parameters in the parenthesis after defining a function, but we never see ‘total’ again???
Chris FreemanTreehouse Moderator 67,464 Points
total being referenced in the
math.ceil() call in the
return statement, line 7. Yes?
I would really appreciate even more insight into Why total and Total due connect? I get that you can write code to connect it as you explained but my question is not about how to write the code but rather why it works? Is it because total is a word that is within total_due? Would the same apply if we named it apples and apples_due? or any combination of words for that matter so long as the first words match?
example : oranges and oranges_due
assuming we used the same structure but replaced the words total with oranges. and can we also swap out the word due? for example oranges and oranges_eaten. ?