SHARE
TWEET

Untitled

a guest Nov 19th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. # *-* coding: utf-8 *-*
  3. import math
  4.  
  5. a=raw_input("Primeiro valor: ")
  6. b=raw_input("Segundo valor: ")
  7. c=raw_input("Opreação: ")
  8.  
  9. if c == "+":
  10.     print "O resultado é: " + str(int(a)+int(b))
  11.    
  12. if c == "-":
  13.     print "O resultado é: " + str(int(a)-int(b))
  14.    
  15. if c == "*":
  16.     print "O resultado é: " + str(int(a)*int(b))
  17.    
  18. if c == "/":
  19.     print "O resultado é: " + str(int(a)/int(b))
  20.    
  21. if c == "raiz":
  22.     print math.sqrt(float(a))
  23.     print math.sqrt(float(b))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top