Advertisement
KodingKid

Basic Python 3-Bit Binary Calculator - Basic Scripting #43

Dec 17th, 2021
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. int value1
  2. int value2
  3. int value3
  4. value4 = 0
  5. print("Enter 3 numbers that are 0 or 1")
  6. input1 = int(input())
  7. input2 = int(input())
  8. input3 = int(input())
  9. if input1 == "1":
  10.     value4 + 2
  11. if input1 == "0":
  12.     value4 + 0
  13. if else:
  14.     print("I'm sorry, I didn't get that.")
  15. if input2 == "1":
  16.     value4 + 4
  17. if input2 == "0":
  18.     value4 + 0
  19. if else:
  20.     print("I'm sorry, I didn't get that.")
  21. if input3 == "1":
  22.     value4 + 8
  23. if input3 == "0":
  24.     value4 + 0
  25. if else:
  26.     print("I'm sorry, I didn't get that.")
  27. print(value4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement