Python Forum

Full Version: Bill calculator with different prices
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(Sep-14-2018, 09:59 PM)Larz60+ Wrote: [ -> ]delete line 2
replace line 3 with:
total_price = 0.0

Actually, there's no need for line 3 altogether - since total price is calculated in all 3 branches of if/else expression.

Looks like an attempt to declare a variable - in Python, declarations are not needed
Pages: 1 2