id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

gaurav1780@gmail.com 01_variables_and_operators > get_discounted_price
prev  |  next  |  chance

Define a function that when passed an integer representing the ticketed price of an item, and a floating-point number representing the discount (in percentage), returns the sale price (as a floating-point number).


get_discounted_price(200, 25) → 150.0
get_discounted_price(80, 10) → 72.0
get_discounted_price(5, 50) → 2.5

...Save, Compile, Run (ctrl-enter)

def get_discounted_price(ticket_price, discount_percentage):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 1 Post-solution available

Copyright Nick Parlante 2017 - privacy