Day 010 - Project 10 : Extend your bill calculator

If you have any questions, comments or issues with this project please post them here!

Just curious about choice of variable name consistency.

myBill = float(input("What was the bill?: "))
numberOfPeople = int(input("How many people?: "))
tip = int(input("What percent tip do you want to leave: 15, 18, or 20 percent?"))


bill_with_tip = tip / 100 * myBill + myBill
bill_per_person = bill_with_tip / numberOfPeople
final_amount = round(bill_per_person, 2)


print("You all owe", final_amount)

As it’s a Python course, I’d love it if you followed PEP8 and used snake case. Having programs where you mix snake case and camel case seems a strange choice. What’s the thinking?

1 Like

I’m just speculating, but could be that he originally learned another language and that guidance is more in his head.
It isn’t an issue, but I agree would be clearer to mention the main expected styling guidelines and follow those.

The example I pasted was one that @david.morgan put in his solution. It wasn’t one that my learner did. That’s where my confusion came. :slight_smile:

This was before I recorded myself doing the solutions, so other people may have contributed them. I take your point though, my hope is to loop back around and make solution videos for the earlier lessons so I can redo them in a more consistent way.

4 Likes