Answer to Question #309832 in Python for LABELLING NUMBER

Question #309832

LABELLING NUMBERS

0 EVEN

1 ODD

2 EVEN

3 ODD


1
Expert's answer
2022-03-11T11:53:06-0500
def label_numbers(L):
    print("Labelling numbers")
    for x in L:
        if x % 2 == 0:
            print(x, "EVEN")
        else:
            print(x, "ODD")

def main():
    L = [0, 1, 2, 3]
    label_numbers(L)

main()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS