Guard a value with a property

Your task In the code box, write a class Product(name, price, cost) where price is a property whose setter raises ValueError for a negative price, and margin is a read-only property: price - cost, rounded to 2 places. Then press Run my code.

Getting the editor ready