Computer Science, asked by vasthu, 9 months ago

A restaurant has food delivery option

They have both veg and non veg options

Veg is 120 per plate
Non veg is 150 per plate

Apart from this restaurant charges delivery charges based on kilometer

For first 3 kms - 0 rs
For next 3 kms - 3
For remaining - 6

A person can order any number of veg and non veg food.. Calculate the final bill with delivery charges
.
U should also input no.of kilometers​

Answers

Answered by pavithranatarajan855
0

Answer:

kms=int(input("enter distance:"))

veg=int(input("enter no. of veg"))

nonveg=int(input("enter no. of nonveg"))

if(kms<=3):

 bill=(veg*120)+(nonveg*150)

elif(kms>3):

 rem=kms-3

 if(rem<3):

   bill=(veg*120)+(nonveg*150)+3

 else:

   bill=(veg*120)+(nonveg*150)+3+6

print(bill)

 

Explanation:

Please mark me as brainliest

Similar questions