Main content
Course: Intro to computer science - Python > Unit 1
Lesson 4: Arithmetic expressionsChallenge: 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.