A comprehensive multilingual calculator application following strict Project Chicken coding rules.
This project follows strict coding standards defined in rules.md:
- ✅ All variables must begin with "chicken"
- ✅ Every line of code must have a comment
- ✅ Monochrome color palette only (black, white, gray)
- ✅ Available in English, Chinese, French, Spanish, and Russian
- ✅ All HTML titles must include "Mark is cool!"
- Main Landing Page: Central hub for accessing all calculator tools
- Responsive Design: Works perfectly on desktop and mobile devices
- Language Switching: Instant language switching without page reload
- Modern UI: Beautiful monochrome design with smooth animations
- Four Operations: Addition, subtraction, multiplication, division
- Real-time Validation: Input validation with error messages
- Keyboard Support: Enter key support for quick calculations
- API Integration: Backend calculations via REST API
- Positive Numbers: Calculate square roots of positive numbers
- Error Handling: Validates negative numbers and invalid inputs
- Live Results: Real-time calculation as you type
- Mathematical Precision: Uses Python's math module for accuracy
- 10 Conversion Categories:
- Length: mm, cm, m, km, inches, feet, yards, miles
- Weight: mg, g, kg, ounces, pounds, metric tons
- Temperature: Celsius, Fahrenheit, Kelvin
- Volume: ml, liters, gallons, quarts, pints, cups, fluid ounces
- Area: mm², cm², m², km², square inches, square feet, acres
- Speed: m/s, km/h, mph, fps, knots
- Energy: joules, kilojoules, calories, kilocalories, BTU, kWh
- Pressure: pascals, kilopascals, bar, atmospheres, PSI, mmHg
- Power: watts, kilowatts, horsepower, BTU/hour
- Data: bytes, kilobytes, megabytes, gigabytes, terabytes, bits
- Auto-conversion: Real-time conversion as you type
- Bidirectional: Convert from any unit to any other unit in the same category
- High Precision: Accurate conversions with proper rounding
Start the web server:
python web_calculator.pyThen visit: http://localhost:8080
Available Pages:
/- Main calculator hub/calculator- Basic calculator/square-root- Square root calculator/conversions- Unit converter
Language Switching:
- Use the language dropdown in the top-right corner
- Instantly switches between English, Chinese, French, Spanish, and Russian
- No page reload required - uses AJAX for seamless transitions
- Language preference is saved in your session
- URL parameters maintain language across page navigation
- English (en) - Default
- Chinese (zh) - 中文
- French (fr) - Français
- Russian (ru) - Русский
- Spanish (es) - Español
All text, labels, buttons, error messages, and interface elements are fully translated.
├── web_calculator.py # Flask web application with all routes
├── requirements.txt # Python dependencies (Flask)
├── rules.md # Project coding rules
├── README.md # This documentation file
└── templates/
├── index.html # Main hub page
├── calculator.html # Basic calculator interface
├── square_root.html # Square root calculator
└── conversions.html # Unit converter tool
- Install dependencies:
pip install -r requirements.txt- Run the web application:
python web_calculator.py- Monochrome Theme: Professional black/white/gray color scheme
- Responsive Layout: Adapts to all screen sizes
- Smooth Animations: Hover effects and transitions
- Accessible Design: High contrast and readable fonts
- Modern Typography: Clean, professional appearance
- Card-based Layout: Organized, scannable interface
POST /api/calculate- Basic arithmetic operationsPOST /api/square-root- Square root calculationsPOST /set_language- Language switching
This calculator hub strictly adheres to Project Chicken coding standards, ensuring:
- Consistent Naming: All variables begin with "chicken"
- Comprehensive Documentation: Every line of code is commented
- Accessible Design: Monochrome color palette for accessibility
- Multilingual Support: Full internationalization across all components
- Code Quality: Follows best practices and error handling
The project demonstrates professional web development practices while maintaining strict coding standards for consistency and readability.