Computer Science, asked by shruti13845, 5 months ago

guys plzzz help

do not spam​

Attachments:

Answers

Answered by jai696
3

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

def commission(sales):

keys = ["commission rate", "commission"]

if 0 <= sales <= 20000:

rate = .03

commission = sales * rate

return dict(zip(keys, [f"{rate:.2%}", commission]))

if 20000 <= sales <= 50000:

rate = .12

commission = sales * rate

return dict(zip(keys, [f"{rate:.2%}", commission]))

rate = .31

commission = sales * rate

return dict(zip(keys, [f"{rate:.2%}", commission]))

for k, v in commission((sales := float(input("sales: ")))).items():

print(f"{k}: {v}")

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions