You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
535 B
20 lines
535 B
a = int(input("Zadej prvni cislo"))
|
|
b = int(input("Zadej druhe cislo"))
|
|
|
|
operator = input("Zadej operátor")
|
|
if operator == '+':
|
|
print("Součet je", a + b)
|
|
elif operator == '-':
|
|
print("Rozdíl je", a - b)
|
|
elif operator == '*':
|
|
print("Součin je", a * b)
|
|
elif operator == '/':
|
|
print("Podíl je", a // b)
|
|
elif operator == '%':
|
|
print("Modulo je", a % b)
|
|
elif operator == '^':
|
|
print("Mocnina je", a ** b)
|
|
elif operator == 'f':
|
|
print("Magická funkce je", a**2 + b**2)
|
|
else:
|
|
print("Tento operátor neznám")
|
|
|