Techiio-author
Started by Anik AdhikaryMay 13, 2022

Open
Why i cant get it to run?

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE
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

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance