Skip to content

Latest commit

 

History

History
4 lines (2 loc) · 371 Bytes

File metadata and controls

4 lines (2 loc) · 371 Bytes

Write a function calculate_absolute(n: int) -> int that takes an integer n as input and returns its absolute value. The absolute value of a number is its non-negative value, so if the input is -5, the output should be 5, and if the input is 7, the output should be 7.

Hint: you may want to Google how to find the absolute value of an integer in Python!