Currency Division Check

Check if an amount can be evenly divided into 2000, 500, and 100 currency notes.

Logic BuildingIntermediate
Logic Building
# Take amount
amount = int(input("Enter amount: "))

# Check if divisible by all denominations
if amount % 2000 == 0 and amount % 500 == 0 and amount % 100 == 0:
    print("Can be divided evenly")
else:
    print("Cannot be divided evenly")

Output

Enter amount: 10000
Can be divided evenly

Enter amount: 1500
Cannot be divided evenly

Check if amount is divisible by all denominations.

Key Concepts:

  • Use modulo to check divisibility
  • Amount must be divisible by 2000, 500, and 100
  • Use AND to ensure all conditions met