You can download this code by clicking the button below.
This code is now available for download.
Calculates and returns the average of three given numbers.
Technology Stack : Python built-in type checking
Code Type : Function
Code Difficulty :
def aaaa(arg1, arg2, arg3):
"""
计算三个数的平均值
"""
if not all(isinstance(arg, (int, float)) for arg in (arg1, arg2, arg3)):
raise ValueError("All arguments must be int or float")
return (arg1 + arg2 + arg3) / 3