λFPAI
Practice/Shopping Item

Shopping Item

Beginner

Build an Item class with name, price, and quantity.

Methods: total_cost() and apply_discount(percentage). Create a shopping cart scenario with multiple items.

OOP Focus: Simple calculations and encapsulated pricing logic.

Note: This is statement-only in the current Practice version; stdout should be empty.

Loading editor...

Output

Run or submit to see output.