Computer Science, asked by AkshayaG2010, 1 day ago

Write a program in python to calculate 10% discount on the total purchase of stationary

Answers

Answered by samarthkrv
1

Answer:

n = int(input("How many stationary items will you buy? \n"))

sum = 0

stationary = []

print("Enter the prices of all items-")

for i in range(n):

   x = float(input())

   stationary.append(x)

   sum = sum + x

x = (1/10)*sum #getting discount amount to subtract

discounted = sum-x #original sum - discount price

print("The original price:" , sum)

print("After 10% discount:" , discounted)

Explanation:

Similar questions