Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON Can someone help me debug this code in order to get the output required? def get_sale_price(original_price, percent_discount) return original price ** (percent_discount // 100)

PYTHON

Can someone help me debug this code in order to get the output required?

image text in transcribedimage text in transcribed

def get_sale_price(original_price, percent_discount) return original price ** (percent_discount // 100) if __name__ item_count items = [] __main__': input() for i in range(item_count): items.append(input().split(',')) for item in items: price, discount - items [0] sale_price = get_sale_price(discount, price) print(round(sale_price, o)) Output Format The output should contain n lines, each containing the discounted price of the corresponding item (rounded to the nearest integer). Sample Input 0 5 100.00 10 200.00 20 300.00 30 400.00 40 500.00 50 Sample Output 0 90 160 210 240 250

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

Question Can a self-employed person adopt a money purchase plan?

Answered: 1 week ago