Currency Division Check

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

IntermediatePhase 1 - Level 3: Math and Number LogicExample 7 of 10
currency-division-check.py
1# Take amount
2amount = int(input("Enter amount: "))
3
4# Check if divisible by all denominations
5if amount % 2000 == 0 and amount % 500 == 0 and amount % 100 == 0:
6 print("Can be divided evenly")
7else:
8 print("Cannot be divided evenly")

Output

Enter amount: 10000
Can be divided evenly

Enter amount: 1500
Cannot be divided evenly

What's going on

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