does this make sense

hey does this make sense, and if not can you explain why and the better way lol. i know its simple but please help me check thanks

from operator import add, sub, mul, truediv, floordiv, mod

"""
In the console, type expressions that use function calls
and correspond to each arithmetic expression.
Use the console to check your work.

Useful documentation:
https://docs.python.org/3/library/operator.html#mapping-operators-to-functions
"""

# Q1: 30 + 2

def add(a,b)
    return a + b
    

# Q2: 30 - 2
def sub(a,b)
    return a-b

# Q3: 30 * 2
def mul(a,b)
    return a*b

# Q4: 30 / 2
def div (a,b)
    return a/b

# Q5: 30 % 2
def mod(a.b)
    return a&b


# Nested!

# Q6: 30 + (2 * 4)
def new(a,b)
    return add(a, mul(a.b))
    

# Q7: 3 * (10 - 2)
def kill(a,b)
    return mul(a, sub(a,b))


# Challenge!

# Q8: (3 ** (365/52)) - 1
def fire(a,b)
    return (a ** div(365,52)- 1)
Comments (0)