12. Write a python program to print out all the add numbers and only stop the printing immediately for the remaining numbers come after 88 based on the list_a provided in the following output
The output is:
numbers = [23, 66, 98, 56, 45, 78, 33, 52, 14, 65, 79, 90, 8,
35, 58, 60, 32, 48, 36, 68, 24, 80, 56, 78, 35, 88, 24, 56, 79, 43, 67, 32, 78, 43, 79,
66, 54, 78, 35, 78, 56, 89, 43, 67, 89, 43, 78, 98, 12, 61, 29, 35, 82, 49, 73, 56, 37 ]
Expected Sample Answer:
23
45
33
65
79
35
35
88
Sample Answer:
numbers = [ 23, 66, 98, 56, 45, 78, 33, 52, 14, 65, 79, 90, 8, 35, 58, 60, 32, 48, 36, 68, 24, 80, 56, 78, 35, 88, 24, 56, 79, 43, 67, 32, 78, 43, 79, 66, 54, 78, 35, 78, 56, 89, 43, 67, 89, 43, 78, 98, 12, 61, 29, 35, 82, 49, 73, 56, 37 ] for i in numbers: if i == 88: print(i) break; elif i % 2 != 0: print(i)
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)