Skip to content
Advertisement

Python: Random list with odds and even numbers

New to python. I’ve got an assignment where I have to generate a random list of numbers between -10 and 30 and then proceed to call odds and evens from the list. So far I’ve got this, but I have no idea how to proceed and how to make it actually work properly. Also I need to figure out how to also check positive and negative numbers from the list, but currently I’m just stuck at odds and evens.

JavaScript

Advertisement

Answer

You’re maybe looking for something like this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement