Find the max odd number from 10 inputs [on hold]











up vote
-3
down vote

favorite












Hi every one this is my code which is perfect but in print "All are even number" is not working perfectly >>> it is print 10 times when all are even



code is here :-



a = int(input('Enter a value: '))

b = int(input('Enter a value: '))

c = int(input('Enter a value: '))

d = int(input('Enter a value: '))

e = int(input('Enter a value: '))

f = int(input('Enter a value: '))

g = int(input('Enter a value: '))

h = int(input('Enter a value: '))

i = int(input('Enter a value: '))

j = int(input('Enter a value: '))

list1 = [a, b, c, d, e, f, g, h, i, j]

list2 = # used to sort the ODD values into

list3 = (a+b+c+d+e+f+g+h+i+j)

if (list3 % 2 == 0):

for even in list1:

if (even % 2 == 0):

print('All declared variables have even values')
else:
for odd in list1:

if (odd % 2 == 1):

list2.append(odd)

odd = max(list2)

print ('The largest ODD value is ', odd)









share|improve this question









New contributor




PRANAV THAKKAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by Toby Speight, Mathias Ettinger, Graipher, 200_success, πάντα ῥεῖ yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Mathias Ettinger, Graipher, 200_success, πάντα ῥεῖ

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 6




    It can't be "perfect" if it's "not working perfectly". In the latter case, the bug needs to be fixed before it's ready for review.
    – Toby Speight
    yesterday















up vote
-3
down vote

favorite












Hi every one this is my code which is perfect but in print "All are even number" is not working perfectly >>> it is print 10 times when all are even



code is here :-



a = int(input('Enter a value: '))

b = int(input('Enter a value: '))

c = int(input('Enter a value: '))

d = int(input('Enter a value: '))

e = int(input('Enter a value: '))

f = int(input('Enter a value: '))

g = int(input('Enter a value: '))

h = int(input('Enter a value: '))

i = int(input('Enter a value: '))

j = int(input('Enter a value: '))

list1 = [a, b, c, d, e, f, g, h, i, j]

list2 = # used to sort the ODD values into

list3 = (a+b+c+d+e+f+g+h+i+j)

if (list3 % 2 == 0):

for even in list1:

if (even % 2 == 0):

print('All declared variables have even values')
else:
for odd in list1:

if (odd % 2 == 1):

list2.append(odd)

odd = max(list2)

print ('The largest ODD value is ', odd)









share|improve this question









New contributor




PRANAV THAKKAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by Toby Speight, Mathias Ettinger, Graipher, 200_success, πάντα ῥεῖ yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Mathias Ettinger, Graipher, 200_success, πάντα ῥεῖ

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 6




    It can't be "perfect" if it's "not working perfectly". In the latter case, the bug needs to be fixed before it's ready for review.
    – Toby Speight
    yesterday













up vote
-3
down vote

favorite









up vote
-3
down vote

favorite











Hi every one this is my code which is perfect but in print "All are even number" is not working perfectly >>> it is print 10 times when all are even



code is here :-



a = int(input('Enter a value: '))

b = int(input('Enter a value: '))

c = int(input('Enter a value: '))

d = int(input('Enter a value: '))

e = int(input('Enter a value: '))

f = int(input('Enter a value: '))

g = int(input('Enter a value: '))

h = int(input('Enter a value: '))

i = int(input('Enter a value: '))

j = int(input('Enter a value: '))

list1 = [a, b, c, d, e, f, g, h, i, j]

list2 = # used to sort the ODD values into

list3 = (a+b+c+d+e+f+g+h+i+j)

if (list3 % 2 == 0):

for even in list1:

if (even % 2 == 0):

print('All declared variables have even values')
else:
for odd in list1:

if (odd % 2 == 1):

list2.append(odd)

odd = max(list2)

print ('The largest ODD value is ', odd)









share|improve this question









New contributor




PRANAV THAKKAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Hi every one this is my code which is perfect but in print "All are even number" is not working perfectly >>> it is print 10 times when all are even



code is here :-



a = int(input('Enter a value: '))

b = int(input('Enter a value: '))

c = int(input('Enter a value: '))

d = int(input('Enter a value: '))

e = int(input('Enter a value: '))

f = int(input('Enter a value: '))

g = int(input('Enter a value: '))

h = int(input('Enter a value: '))

i = int(input('Enter a value: '))

j = int(input('Enter a value: '))

list1 = [a, b, c, d, e, f, g, h, i, j]

list2 = # used to sort the ODD values into

list3 = (a+b+c+d+e+f+g+h+i+j)

if (list3 % 2 == 0):

for even in list1:

if (even % 2 == 0):

print('All declared variables have even values')
else:
for odd in list1:

if (odd % 2 == 1):

list2.append(odd)

odd = max(list2)

print ('The largest ODD value is ', odd)






python






share|improve this question









New contributor




PRANAV THAKKAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




PRANAV THAKKAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Mathias Ettinger

22.7k33077




22.7k33077






New contributor




PRANAV THAKKAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









PRANAV THAKKAR

1




1




New contributor




PRANAV THAKKAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





PRANAV THAKKAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






PRANAV THAKKAR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by Toby Speight, Mathias Ettinger, Graipher, 200_success, πάντα ῥεῖ yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Mathias Ettinger, Graipher, 200_success, πάντα ῥεῖ

If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by Toby Speight, Mathias Ettinger, Graipher, 200_success, πάντα ῥεῖ yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Toby Speight, Mathias Ettinger, Graipher, 200_success, πάντα ῥεῖ

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 6




    It can't be "perfect" if it's "not working perfectly". In the latter case, the bug needs to be fixed before it's ready for review.
    – Toby Speight
    yesterday














  • 6




    It can't be "perfect" if it's "not working perfectly". In the latter case, the bug needs to be fixed before it's ready for review.
    – Toby Speight
    yesterday








6




6




It can't be "perfect" if it's "not working perfectly". In the latter case, the bug needs to be fixed before it's ready for review.
– Toby Speight
yesterday




It can't be "perfect" if it's "not working perfectly". In the latter case, the bug needs to be fixed before it's ready for review.
– Toby Speight
yesterday















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Morgemoulin

Scott Moir

Souastre