Sobes.tech
Intern — Middle

Creating a function to divide two numbers

livecode

Task condition

Check whether the provided program meets the division task requirements: are the parameters passed correctly, is the result displayed, and is it necessary to return a value from the function.


def GetCalc(num1, num2):
    result = num1 / num2
    print("Division result:", result)


def main():
    val1, val2 = 10, 5
    output = GetCalc(val1, val2)


if __name__ == '__main__':
    main()