feat(r-1.4.py): assembled completed deliverable and fixed reassignment of built in list class
This commit is contained in:
+2
-12
@@ -1,19 +1,9 @@
|
||||
"""
|
||||
Full disclosure, prior to attempting this, I actually looked at the link
|
||||
at the top of page 51, and even visited it. I also relied heavily on w3schools
|
||||
compared to the textbook. While initially learning Python, I found the language
|
||||
of the book difficult, but as I grasped concepts, it came easier. I will also
|
||||
be creating scratch files when needed to test ideas. They will not be submitted
|
||||
with my lab submissions but will be available at my Gitea link posted with
|
||||
my submitted files.
|
||||
"""
|
||||
|
||||
def is_even(k):
|
||||
if k & 1 == 0:
|
||||
print(True)
|
||||
else:
|
||||
print(False)
|
||||
|
||||
|
||||
|
||||
print('Is "k" an even number?')
|
||||
is_even(int(input('Give a value for k: ')))
|
||||
is_even(int(input('Give a value for k: ')))
|
||||
|
||||
Reference in New Issue
Block a user