Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge | Functions
Introduction to Python

Challenge

Tarefa

Your task is to create a function called is_positive that takes in a single argument, n. It should return:

  • 'positive' if n is greater than 0.
  • 'negative' if n is less than 0.
  • 'zero' if n is equal to zero.

Tudo estava claro?

Seção 6. Capítulo 6
toggle bottom row
course content

Conteúdo do Curso

Introduction to Python

Challenge

Tarefa

Your task is to create a function called is_positive that takes in a single argument, n. It should return:

  • 'positive' if n is greater than 0.
  • 'negative' if n is less than 0.
  • 'zero' if n is equal to zero.

Tudo estava claro?

Seção 6. Capítulo 6
toggle bottom row
some-alt