Reference no: EM132382441
Question
You need a Python program to do the following:
(a) Use the range function to generate this sequence of integers: 5, 9, 13, 17 and 21. Save the numbers in a list. Display the list.
(b) Use a for loop to display each element in a separate line.
(c) Use the range function to generate this sequence of integers: 26, 19, 12 and 5. Save the numbers in a list. Display the list.
(d) Use a for loop to calculate the total of the elements in the second list. Display the total.
The following is the expected output. There is no user input in this program.
First list: [5, 9, 13, 17, 21]
Elements in the first list:
5
9
13
17