LearnPy Hub
← Inheritance & Special Methods problems
Medium

Equal Objects

Write a Money class (amount, currency) with __eq__: equal when both amount and currency match. Read two lines amount currency and print whether they are equal, then whether they are the same object (is).

Input

Two lines.

Output

Two lines.

Sample 1

Input
100 BDT
100 BDT
Output
True
False

Sample 2

Input
100 BDT
100 USD
Output
False
False
solution.py
Output appears here
Equal Objects · Python practice problem · LearnPy Hub