Is it positive? · ¿Es positivo?
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · Esta página necesita un navegador reciente (con soporte para SharedArrayBuffer). Por favor, actualiza Chrome, Edge, Firefox o Safari a la última versión.
This one builds on a lesson you haven't finished yet. Do that lesson first: · Este ejercicio se basa en una lección que no has terminado. Haz esa lección primero:
Python Basics · Introducción a Python · Functions · Funciones →
English
Is it positive?
A number is positive when it is greater than 0. The test n > 0 is already True or False — you can return it directly.
Español
¿Es positivo?
Un número es positivo cuando es mayor que 0. La prueba n > 0 ya devuelve un valor True o False; puedes retornarla directamente.
Complete is_positive(n): return True when n > 0, else False. · Completa is_positive(n): devuelve True cuando n > 0, de lo contrario False.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.