1
List Structure
2
3
While loop statement - Ex14_2
List reversed elements
Write a Python program that iterate each element in a provided List and print it.
elements = [ 1, 2, 3, 5, 10 ]
Code Provided
Expected outcome after your program executed
10
5
3
2
1
Print in the console
Save the file as "XX_YYYY_Ex14_2.py"
While loop statement - Ex14_3
Save the file as "XX_YYYY_Ex14_3.py"
Product all values from the elements
Write a Python program that iterate each element in a provided List, and the calculate the product of each elements in the list.
elements = [ 1, 2, 3, 5, 10 ]
Code Provided
Expected outcome after your program executed
300
Print in the console
While loop statement - Ex14_4
Show all odd number of the list
Write a Python program that iterate each element in a provided List and print it if the element is not an even number.
elements = [ 1, 2, 3, 5, 10 ]
Code Provided
Expected outcome after your program executed
1
3
5
Print in the console
Save the file as "XX_YYYY_Ex14_4.py"