Question: Help me fix the following errors on my code: Line 1 1 : Incompatible types in assignment ( expression has type float, variable has type
Help me fix the following errors on my code:
Line : Incompatible types in assignment expression has type "float", variable has type "int"assignment
Line : Unsupported operand types for str and "int"operator
Line : Incompatible types in assignment expression has type "float", variable has type "int"assignment
Line : Incompatible types in assignment expression has type "float", variable has type "int"assignment
Line : Incompatible types in assignment expression has type "float", variable has type "int"assignment
Line : Incompatible types in assignment expression has type "float", variable has type "int"assignment
Line : Unsupported operand types for int and stroperator
def toFixedvalue digits:
return fdigits value
subTotal
tAXRATE
varcontinue True
printEnter prices:tttttttttttt or for subtotal ttttttttttt or for total:"
inPrice floatinput
while inPrice :
while inPrice :
subTotal subTotal inPrice
inPrice floatinput
while inPrice :
print
printSubtotal:$ toFixedsubTotal
printEnter prices:tttttttttttt or for subtotal tttttttttttt or for total:"
inPrice floatinput
printTotal: subTotal
printCoupon Menu:"
print:No Discount"
print: Discount"
print: Discount"
print: Discount"
print: Discount"
printCoupon choice:"
menuOption input
while menuOption and menuOption and menuOption and menuOption and menuOption :
printInvalid Enter Coupon menu option:"
menuOption input
if menuOption :
discountPercent
if menuOption :
discountPercent
if menuOption :
discountPercent
if menuOption :
discountPercent
if menuOption :
discountPercent
discountAmount subTotal discountPercent
discountedSubTotal subTotal discountAmount
if menuOption :
printSales Tax:$ toFixedsubTotal tAXRATE,
printFinal Total:" toFixedsubTotal subTotal tAXRATE,
else:
printdiscountPercent "Discount:$ toFixeddiscountAmount
printSubtotal After Disc:$ toFixeddiscountedSubTotal
printSales Tax: $ toFixeddiscountedSubTotal tAXRATE,
print
printFinal Total:$ toFixeddiscountedSubTotal discountedSubTotal tAXRATE,
should look something like:
Enter prices:
or for subtotal
or for total:
$
$
$
$
Subtotal:$
Enter prices:
or for subtotal
or for total:
$
$
Subtotal: $
Enter prices:
or fpr subtotal
or for total:
$
$
Coupon Menu:
: No Discount
: Discount
: Discount
: Discount
: Discount
Coupon choice:
Invalid. enter coupon menu option:
Discount: $
Subtotal after discount:$
Sales Tax: $
Final Total: $
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
