1.1 KiB
1.1 KiB
Utility Functions Requirements
Overview
This document outlines the requirements for the utility functions to be implemented in the project.
Function 1: calculate_sum
Description
Calculates the sum of two numbers.
Input Parameters
num1(float): The first number.num2(float): The second number.
Expected Output
- (float): The sum of
num1andnum2.
Function 2: is_even
Description
Determines if a given number is even.
Input Parameters
number(int): The number to check.
Expected Output
- (bool): Returns
trueif the number is even,falseotherwise.
Function 3: string_to_upper
Description
Converts a given string to uppercase.
Input Parameters
input_string(str): The string to convert.
Expected Output
- (str): The uppercase version of
input_string.
Function 4: get_unique_elements
Description
Returns a list of unique elements from the input list.
Input Parameters
input_list(list): The list from which to extract unique elements.
Expected Output
- (list): A list containing unique elements from
input_list.