Question: This program should use a main function and two other functions named playlist and savelist as follows: The main function: The main function should create

This program should use a main function and two other functions named playlist and savelist as follows: The main function: The main function should create an empty list named nums and then use a loop to add ten integers to nums, each integer in the range from 10-90. NOTE: In Python, a list is a data type. See Chapter 7. The main function should then call the playlist function and savelist function, in that order. Both of these functions take the nums list as a sole argument. The playlist function: playlist should use a loop to display the elements of the list, all on one line separated by a single space. playlist should also determine and print the total of the even numbers and the total of the odd numbers. The savelist function: save list should sort the list and write each element to a text file named angles.txt, each element on its own line.

SAMPLE OUTPUT

Here are the integers in nums:

23 85 31 55 42 85 72 33 39 20

Even integers total to 134

Odd integers total to 351

List of integers was written to file.

End of program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!