Changed product2 instance
This commit is contained in:
parent
1a0816bcef
commit
4a36bfdfca
@ -16,10 +16,10 @@ class product:
|
||||
|
||||
# Example usage:
|
||||
|
||||
product1 = product("Laptop", 1999.99, -1)
|
||||
product1 = product("Laptop", 1999.99, 1)
|
||||
print(product1.display_info()) # Output: Item: Laptop, Price: $1999.99
|
||||
print(product1.calculate_total_price()) # Output: 3999996.0001
|
||||
product2 = product("Smartphone", 799.99, 3)
|
||||
product2 = product("Smartphone", 799.99, -3)
|
||||
print(product2.display_info()) # Output: Item: Smartphone, Price: $799.99
|
||||
print(product2.calculate_total_price()) # Output: 2399.97
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user