Lommeregner

# Lommeregneren

def plus(x, y):
    return x + y

def minus(x, y):
    return x - y

def gange(x, y):
    return x * y

def division(x, y):
    return x / y

print("*"*50)
print("\n+\n-\n*\n/\n")
print("*"*50)

valg = input("Vælg: ") # +, -, *, /

num1 = float(input("Nummer 1: ")) # Tal
num2 = float(input("Nummer 2: ")) # Tal

if valg == "+":
    print(num1, "+", num2, "=", plus(num1, num2))

elif valg == "-":
    print(num1, "-", num2, "=", minus(num1, num2))

elif valg == "*":
    print(num1, "*", num2, "=", gange(num1, num2))

elif valg == "/":
    print(num1, "/", num2, "=", division(num1, num2))