def predict_pest_risk(temperature_celsius, humidity_percent):
    """
    Predict pest risk level based on temperature and humidity.
    
    Many agricultural pests thrive in warm, humid conditions.
    This function provides a simple risk assessment.
    
    Args:
        temperature_celsius (float): Temperature in degrees Celsius
        humidity_percent (float): Relative humidity as percentage (0-100)
        
    Returns:
        str: Risk level ('Low', 'Moderate', 'High', 'Very High')
        
    Example:
        >>> predict_pest_risk(26.0, 72)
        'High'
    """
    # Initialize risk score (0-100)
    risk_score = 0
    
    # Temperature contribution to risk
    # Optimal pest activity: 20-32°C
    if temperature_celsius < 15:
        temp_score = 10  # Too cold for most pests
    elif temperature_celsius < 20:
        temp_score = 25
    elif temperature_celsius <= 32:
        temp_score = 50  # Peak pest activity temperature
    elif temperature_celsius <= 37:
        temp_score = 35
    else:
        temp_score = 20  # Too hot for many pests
    
    # Humidity contribution to risk
    # High humidity favors pest breeding and disease spread
    if humidity_percent < 40:
        humid_score = 10  # Low risk
    elif humidity_percent < 60:
        humid_score = 25
    elif humidity_percent < 75:
        humid_score = 40
    else:
        humid_score = 50  # High risk
    
    # Combined risk score
    risk_score = temp_score + humid_score
    
    # Classify risk level
    if risk_score < 40:
        return "Low"
    elif risk_score < 60:
        return "Moderate"
    elif risk_score < 80:
        return "High"
    else:
        return "Very High"
    
def get_pest_management_advice(risk_level):
    """
    Provide basic management advice based on risk level.
    
    Args:
        risk_level (str): Risk level from pest assessment
        
    Returns:
        str: Management recommendation
    """
    advice = {
        "Low": "Continue routine monitoring. No immediate action needed.",
        "Moderate": "Increase field monitoring frequency. Prepare control measures.",
        "High": "Implement preventive measures. Scout fields daily. Consider early intervention.",
        "Very High": "Urgent action needed. Deploy control measures immediately. Monitor closely."
    }
    
    return advice.get(risk_level, "Monitor conditions and consult local extension services.")

 
 # Simple risk prediction
temp = 26.0
humidity = 72
risk = predict_pest_risk(temp, humidity)
print(f"Conditions: {temp}°C, {humidity}% humidity")
print(f"Overall pest risk: {risk}\n")
