Simple Interest Calculator
Calculate simple interest and total amount.
BeginnerPhase 6 - Category 5: Real-World Logic ProblemsExample 4 of 15
simple-interest-calculator.py
1# Take inputs2principal = float(input("Enter principal: "))3rate = float(input("Enter rate (%): "))4time = float(input("Enter time (years): "))56# Calculate7interest = (principal * rate * time) / 1008amount = principal + interest910print(f"Simple Interest: {interest:.2f}")11print(f"Total Amount: {amount:.2f}")
Output
Enter principal: 10000 Enter rate (%): 5 Enter time (years): 2 Simple Interest: 1000.00 Total Amount: 11000.00
What's going on
Calculate simple interest using formula.
Key Concepts:
SI = (P * R * T) / 100
Amount = Principal + Interest
Simple calculation
🔗Related Content
- 📖
Phase 6 - Learn Concepts
Review Phase 6 concepts and explanations
- 📝
Phase 6 - Quiz
Test your Phase 6 understanding with quiz questions
- 💻
Phase 6 - All Practice Problems
Explore all practice problems for Phase 6
- 🎓
Master Your Logic Building - Complete Course
Browse all phases and tutorials
- 🧠
Logic Building Overview
Learn about the complete logic building curriculum