Skip to content

Instantly share code, notes, and snippets.

@jO-Osko
Created April 12, 2018 15:11
Show Gist options
  • Save jO-Osko/1a77176e89de922e06c7f86966037c98 to your computer and use it in GitHub Desktop.
Save jO-Osko/1a77176e89de922e06c7f86966037c98 to your computer and use it in GitHub Desktop.
# Preberemo kot stevilki
x = int(raw_input("Vpisi x:"))
y = int(raw_input("Vpisi y:"))
op = raw_input("Vnesi operacijo (+,-,*,/)")
if op == "+" or op == "plus":
print(x + y)
elif op == "-" or op == "minus":
print(x - y)
elif (op == "*") or op == "mnozenje" or op == "krat":
print(x * y)
elif op == "/":
# Da deluje normalno deljenje
print(float(x) / y)
else:
print("Te operacije ne poznam")
print("koncano")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment