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 amount2amount = int(input("Enter amount: "))34# Check if divisible by all denominations5if 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
🔗Related Content
- 📖
Phase 1 - Learn Concepts
Review Phase 1 concepts and explanations
- 📝
Phase 1 - Quiz
Test your Phase 1 understanding with quiz questions
- 💻
Phase 1 - All Practice Problems
Explore all practice problems for Phase 1
- 🎓
Master Your Logic Building - Complete Course
Browse all phases and tutorials
- 🧠
Logic Building Overview
Learn about the complete logic building curriculum