lundi 23 janvier 2017

Checking the number with random function(excluding and including)

i'm new in coding via python language.

Anyway; i'll cut the chess, dear sirs, i need your help.

For instance:

I created a number table.(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14) I defined 4 number in this table.(2,3,5,8) So, i want to exclude the numbers that i defined from number table. After that, if the defined numbers got more even numbers(which is i defined in second number hole)I want to choose a number which it will be even number in the number table.But if the odd numbers are more, i want to choose a number which it will be odd number in the number table that i created.Also this choosen number must be close to last number that i defined.(for example: 8)

Thanks for help, i'm waiting all your questions.




Aucun commentaire:

Enregistrer un commentaire