1def mySum(a: float, b: float) -> float:
2 """
3 mySum(a, b) Calculates the sum of two numbers
4
5 example: mySum(1.0, 2.0) -> 3.0
6
7 example: mySum(2.0, -1.5) -> 0.5
8
9 :param: a: First number
10
11 :param: b: Second Number
12
13 :returns: sum of first and second number
14
15 """
16
17 return a+b # Actual function body
1# Docstrings are used create your own Documentation for a function or for a class
2# we are going to write a function that akes a name and returns it as a title.
3def titled_name(name):
4 # the following sting is Docstring
5 """This function takes name and returns it in a title case or in other
6 words it will make every first letter of a word Capitalized"""
7 return f"{name}".title()