common module¶
The common module contains common functions and classes used by the other modules.
hello(name)
¶
Prints "Hello {name}!" to console.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str |
The name to print. |
required |
Source code in geotask/common.py
def hello (name):
"""Prints "Hello {name}!" to console.
Args:
name (str): The name to print.
"""
print(f"Hello {name}!")
hello_world()
¶
Prints "Hello World!" to the console.
Source code in geotask/common.py
def hello_world():
"""Prints "Hello World!" to the console.
"""
print("Hello World!")
random_number()
¶
Returns a random number between 0 and 1.
Returns:
Type | Description |
---|---|
float |
A random number between 0 and 1. |
Source code in geotask/common.py
def random_number():
"""Returns a random number between 0 and 1.
Returns:
float: A random number between 0 and 1.
"""
import random
return random.random()