Answer:
#!/usr/bin/env python
def calculate(x, y):
return {
"MOD": x % y,
"DIV": x/y, # you mean div instead of “VID”, right?
"floating-point division": float(x)/y,
}
def calculateInBothSettings(x, y):
return {
"x/y": calculate(x, y),
"y/x": calculate(y, x),
}
if __name__ == "__main__":
x = int(input("x: "))
y = int(input("y: "))
print(calculateInBothSettings(x, y))
Step-by-step explanation:
I wrote a python script. Example output:
x: 2
y: 3
{'x/y': {'MOD': 2, 'DIV': 0.6666666666666666, 'floating-point division': 0.6666666666666666}, 'y/x': {'MOD': 1, 'DIV': 1.5, 'floating-point division': 1.5}}