Skip to content

Instantly share code, notes, and snippets.

@code2be
Created September 8, 2022 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save code2be/c8019edbe544553cd5a5addafb75d277 to your computer and use it in GitHub Desktop.
Save code2be/c8019edbe544553cd5a5addafb75d277 to your computer and use it in GitHub Desktop.
x = float(input("Enter first number"))
y = float(input("Enter second number"))
o = input("Enter operator") # + - / * %
if o == "+":
print(x + y)
elif o == "-":
print(x - y)
elif o == "*":
print(x * y)
@moezmo
Copy link

moezmo commented Sep 8, 2022

wow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment