1.

I will mark the person brainlist who answer the questionWAP to input the type of department(cloth/electronices) and amount and print discount ,amount payable , purchase amount purchase amount discoun onclothupto 2500 2%2501 to 5000 3%5001 to 7500 3.5%more than 7500 4%amount dis on electronicsupto 2500 3%2501 to 5000 4%5001 to 7500 6%mare than 7500 8%output should be like this:enter type of departmentclothenter purchase amount1000purcahse amount =Rs1000discount=Rs20amount payable=Rs 980Remember:If you input any other departmebt except for cloth/electronics output should be invalid department only​

Answer»

dept = ["cloth","electronics"]

print("Enter Type Of Department:")

temp_dept = input()

print("Enter Purchase Amount")

temp_pur = INT(input())

print("Purchased Amount is")

print(temp_pur)

temp_disc = 0

if temp_dept == dept[0]:

   if temp_pur < 2500 and temp_pur != 0:

       temp_disc = (2/100) * temp_pur

   elif temp_pur > 2500 and temp_pur < 5000:

       temp_disc = (3/100) * temp_pur

   elif temp_pur > 2500 and temp_pur < 5000:

       temp_disc = (3.5/100) * temp_pur

   elif temp_pur > 7500:

       temp_disc = (4/100) * temp_pur

   else:

       print("Purchase Amout Should Not Be 0")

   print("Discount")

   print(temp_disc)

   print("amount payable")

   print(temp_pur - temp_disc)

elif temp_dept == dept[1]:

   if temp_pur < 2500 and temp_pur != 0:

       temp_disc = (3/100) * temp_pur

   elif temp_pur > 2500 and temp_pur < 5000:

       temp_disc = (4/100) * temp_pur

   elif temp_pur > 2500 and temp_pur < 5000:

       temp_disc = (6/100) * temp_pur

   elif temp_pur > 7500:

       temp_disc = (8/100) * temp_pur

   else:

       print("Purchase Amout Should Not Be 0")

   print("Discount")

   print(temp_disc)

   print("amount payable")

   print(temp_pur - temp_disc)

else:

   print("INVALID Department.")

NOTE: you did not MENTIONED the language so i used python 3 to write the program

Hope you will mark this as Brainliest



Discussion

No Comment Found