0
Why is my code wrong, someone should please explain in datails to me
Write a program that asks the user to input 10 integers, then print the largest odd number, if no odd number was entered, print a message to that effect. var=0 X= int(input( "input 10 random integers : ")) while (X %2!=0): var+=1 for i in range(x): print (i)
4 Answers
+ 4
đđ˘đ˘đđ¨ đđĄđđ˛đđĽ , in your first code:
...
("No Found") if a==[] else print(max(a))
will not print the message "No Found", when there is no odd value in the list 'a'. ("No Found") as it is in the code, creates a string, but does not save it. So to print this output ("No Found"), use:
print("No Found") ...
0
Am new to programming, i just started python some few days ago, can you explain in a why i can understand please...