Respuesta :
The required program written in python 3 is displayed below :
weight = eval(input())
#prompts user to enter weight value
miles = eval(input())
#prompts user to enter number of miles
if miles <= 500:
#shipping calculation for miles value below 500 miles
if weight <=2 :
shipping_charge = 1.10
elif(weight>2)and(weight<=6):
shipping_charge = 2.20
elif(weight>6)and(weight<=10):
shipping_charge = 3.70
elif(weight>10):
shipping_charge=3.80
#shipping charge for each weight category
else:
#shipping cost if the miles value entered is above 500 miles
if weight <=2 :
shipping_charge = 1.10 * round(miles/500)
#number of miles divided by 500 is rounded to the nearest whole number and multiplied by the 500 Mile charge
elif(weight>2)and(weight<=6):
shipping_charge = 2.20 * round(miles/500)
elif(weight>6)and(weight<=10):
shipping_charge = 3.70 * round(miles/500)
elif(weight>10):
shipping_charge=3.80 * round(miles/500)
print('Your total shipping charge is :