Advertisement
bacnguyenxgen

Untitled

Oct 22nd, 2022
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1.  
  2. so1 = float(input("Mời bạn nhập số thứ nhất:"))
  3. so2 = float(input("Mời bạn nhập số thứ hai:"))
  4. phep = input("Mời bạn nhập phép tính:")
  5. if phep =="+":
  6.     print (so1+so2)
  7. elif phep == "-":
  8.     print (so1-so2)
  9. elif phep == "*":
  10.     print(so1*so2)
  11. elif phep =="/":
  12.     print (so1/so2)
  13. else:
  14.     print("Bạn đã nhập sai phép tính")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement