Now i am calculating the total for the following entries . if i dont give an input i want it to consider the input as zero , however if there is no input there is no total computation . a simple variable=='' detection.
#getting the quantity of fries etc
coF=float(Fries.get()) #cost of fries
coD=float(Drinks.get())
coFilet=float(Filet.get())
coBurger=float(Burger.get())
coChicken=float(Chicken_Burger.get())
coCheese=float(Cheese_Burger.get())
#computation
costofFries=coF * 300 #store whatever is entered in widget
costofDrinks=coD * 300
costofFilet=coFilet * 200
costofBurger=coBurger * 100
costofChicken=coChicken * 150
costofCheese=coCheese * 100
#total calculation
paytax=((costofFries+costofDrinks+costofFilet+costofBurger+costofChicken
+costofCheese)*0.2)
TotalCost=(costofFries+costofDrinks+costofFilet+costofBurger+costofChicken
+costofCheese)
Ser_Charge=((costofFries+costofDrinks+costofFilet+costofBurger+costofChicken
+costofCheese)/99)
now if i enter all of it then i get the total computed correctly , if i dont enter values it dosent compute total.Please suggest!