You are viewing a single comment's thread. Return to all comments →
If you`re using python, then instead of using int(totalMealCost) use int(round(totalMealCost))
This is because
int(10.99999) = 10 while round(10.99999) = 11.0
To convert 11.0 to 11 use int(11.0) = 11
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
If you`re using python, then instead of using int(totalMealCost) use int(round(totalMealCost))
This is because
int(10.99999) = 10 while round(10.99999) = 11.0
To convert 11.0 to 11 use int(11.0) = 11