number_of_bags=5
extra_fee = 0.0
weight_list =['95', '14', '19', '75', '20']
If (number of bags>=2):
print=('total number of bags more than 2. Your fee will be 25 dollars for each bag')
extra_bags=number_of_bags -2 extra_fee=extra_bags*100
print('extra fee')
for weight in weight_list:
if(weight>50):
extra_fee +=(weight-50) *4
print (extra_fee)
File "C:\Users\mrsea\AppData\Local\Temp/ipykernel_8168/2566679235.py", line 6 If (number_of_bags>=2):
SyntaxError: invalid syntax
Can someone tell me what is wrong with this?
0 Replies