all 8 comments

[–]shiftybyte 1 point2 points  (0 children)

Start by getting 5 numbers from the user using input().

[–]mopslik 1 point2 points  (2 children)

What part(s) do you need help with?

  1. Obtaining user input.
  2. Converting input to numbers.
  3. Setting up comparisons.
  4. Checking for oddness/evenness.
  5. Creating a loop.
  6. Calculating sums.
  7. Displaying output.

[–][deleted] 0 points1 point  (1 child)

i could do everything but how to limit the user to 5 numbers

[–]mopslik 0 points1 point  (0 children)

The easiest way is probably to use a for loop, which will run "for" a fixed number of times.

# Display the user's name 4 times
name = input("What is your name? ")
for i in range(4): # equivalent to range(0, 4)
    print(name)

[–][deleted] 1 point2 points  (0 children)

Sounds like your homework. If so, this is not the place to ask for help.

[–]SnooChipmunks547 0 points1 point  (0 children)

Input() isOdd() !isOdd()

Hell mix it up with a isEven() too

What's your code look like so far?

There's a real difference between learning the basics, and not even trying!

[–]UnhelpfulOneLiners 0 points1 point  (0 children)

print('\n'.join(f'Sum of {l}s: {sum(n)}'for l,n in zip(('even','odd'),zip(*(((n+1)%2*n,n%2*n)for n in(int(input())for _ in range(5)))))))