Check if a number is positive
Scanned 6/6/2026
Install via CLI
openskills install bdambrosio/Cognitive_workbench---
name: is-positive
description: Check if a number is positive
type: python
schema_hint:
target: "$variable or Note ID"
out: "$variable (optional)"
parameters: none
examples:
- '{"type":"if","condition":{"type":"tool_condition","tool":"is-positive","target":"$score"},"then":[...]}'
---
# Is Positive
Checks if the input value is a positive number (greater than zero).
## Purpose
Simple boolean condition for numeric validation and control flow.
## Input Format
Accepts:
- Integer or float value
- String representation of number
## Output Format
Returns boolean:
- `True` if value > 0
- `False` otherwise
## Examples
Input: 5
Output: True
Input: -3
Output: False
Input: "42"
Output: True
No comments yet. Be the first to comment!
使用pytest、TDD方法、夹具、模拟、参数化和覆盖率要求的Python测试策略。