Feb-24-2022, 09:06 AM
Hi @gachicardo , you are almost there. You missed one detail:
Then in the "while" loop after you decided the entered number is allowable, append this number to the list AND increase the counter.
Because you increase the counter, the "while" loop will stop in time.
Also note this:
(Feb-24-2022, 05:15 AM)gachicardo Wrote: to accept only 10 integers on a listSo there must be a list. Define an empty list at the start of your program like "result_list = []".
Then in the "while" loop after you decided the entered number is allowable, append this number to the list AND increase the counter.
Because you increase the counter, the "while" loop will stop in time.
Also note this:
(Feb-24-2022, 05:15 AM)gachicardo Wrote: will not be accepted because it is the third odd integerSo you need to refuse a number if "odd_count == 3". Not "> 3".