diff --git a/lab-01/r-1.2_scratch.py b/lab-01/r-1.2_scratch.py index 596265c..ca09a01 100644 --- a/lab-01/r-1.2_scratch.py +++ b/lab-01/r-1.2_scratch.py @@ -4,7 +4,18 @@ Created on Wed Sep 2 21:21:46 2026 @author: joseph + +- I created this file to find out how binary operations would format output +after I realized that I couldn't k&2 because it was not reliable. I believe I +now understand it to be that & sets each bit to 0 if either bit is 0, therefore +when running k&2, it was printing the decimal version of the binary output, +which would be either 2 or 0. """ -def is_even(k): - if k & \ No newline at end of file +k = (int(input('Give a value for k... '))) +l = k & 2 +print(l) + + + + \ No newline at end of file