Apply 10% tax to 100
Input
apply_tax(100)
Output
110.0
With TAX_RATE = 0.1, 100 + 100 * 0.1 = 110.0.
Full lesson preview
Use a module-level global variable inside a function to compute a result.
Problem statement
Task
Examples
Input
apply_tax(100)
Output
110.0
With TAX_RATE = 0.1, 100 + 100 * 0.1 = 110.0.
Input format
Output format
Constraints
Samples
Input
apply_tax(50.5)
Output
55.55
50.5 + 50.5 * 0.1 = 55.55 (with TAX_RATE = 0.1).