A Simple Task

Published by Werdna in

Mubashir needs your help in a simple task.

Create a function which takes a number n and return its decimal part.

Examples

decimal_part(1.2) ➞ 0.2

decimal_part(-3.73) ➞ 0.73

decimal_part(10) ➞ 0

Notes

  • Don't forget to return the result.
  • If you get stuck on a challenge, find help in the Resources tab.
  • If you're really stuck, unlock solutions in the Solutions tab.
Watch a quick demo on how Edabit works.