If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Challenge: Coupon codes

Instructions

Step 1

Fix the TypeErrors

Travis saved up to buy a new pair of cleats. He wants to make sure he gets the best price, so he built a browser extension to help him compare coupon codes.

The cleats currently cost $99.99, but when Travis runs the program and enters 99.99 at the prompt, he gets a TypeError.

  • Identify and add the two missing type conversions such that the program runs without any errors.

Recall that you can convert between data types with the str(), int(), and float() functions. The format of the program output should not change.

Code editor

Code files

Output