Computer Science, asked by arpitshukla1090, 3 months ago

n=377
if n%2==0:
print("Even")
else:
print("Odd")​

Answers

Answered by umeshnirmal04
0

Answer:

have tried a couple different methods, but every time I print, there are odd numbers mixed in with the evens!

I know how to generate even/odd numbers if I were to do a range of 0-100, however, getting only the even numbers from the previous mentioned list has me stumped!

P.S. I've only been using python for a couple days, if this turns out to be extremely simple, thanks in advance!

EDIT: Thanks for all the replies, with your help I've gotten through this little problem. Here is what I ended up with to complete a little excercise asking to sum the even numbers of fibonacci sequence:

F = [1, 2]

Similar questions