Title: Implement activeLearning.sayHello with optional parameter and deterministic outputs
Description:
Create a Python module named activeLearning.py that exports a function sayHello with an optional parameter name. The function must adhere to the following behavior:
Signature: def sayHello(name=None)
If no argument is provided (name is None), return the string 'Hello World'.
If an argument is provided, convert it to a string and return 'Hello {value}', where value is the string representation of the argument.
The function must handle inputs such as strings ('Sankha') and numbers (-1), producing 'Hello Sankha' and 'Hello -1' respectively.
When imported as import activeLearning as tP, tP.sayHello() must return 'Hello World'. tP.sayHello('Sankha') must return 'Hello Sankha'. tP.sayHello(-1) must return 'Hello -1'.
Constraints:
No external dependencies; pure Python.
The behavior should be deterministic for the tested inputs.
Include a clear docstring describing the function’s behavior.
Steps to Reproduce:
Create a file named activeLearning.py implementing the sayHello function per above spec.
In Python, import the module as: import activeLearning as tP
Call tP.sayHello() and verify the result is 'Hello World'
Call tP.sayHello('Sankha') and verify the result is 'Hello Sankha'
Call tP.sayHello(-1) and verify the result is 'Hello -1'
Acceptance Criteria:
A Python module activeLearning.py exists with a function sayHello(name=None).
The function returns 'Hello World' when called with no arguments.
The function returns 'Hello {value}' where value is the string form of the argument when provided.
The provided test cases pass: tP.sayHello(), tP.sayHello('Sankha'), tP.sayHello(-1).
The function includes a clear docstring describing its behavior.
No external dependencies are used; implementation is pure Python and deterministic.