Answered step by step
Verified Expert Solution
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?
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 250Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started