Write a program that first reads the size of the list and then randomly generates a list of integers, each integer is between 1 and 100. The program prints randomly generated list and finds and prints the number of items that are even and divisible by 3.
Write a function process that has one parameter - list of integers. The function finds and returns the following: average of all items in the list and the number of items below average.
Write a program that reads the size of the list and randomly generates the list of integers between -10 and 10. The program then uses function process to find the average of all elements in the list and the number of items below average.
Some township requires separation of recycling items into three categories: (1)plastic (2) glass and (3) paper.
Write a program that first reads the number of items person recycled during one week. For each item the program reads the weight of the item and the category indicator. Store weights in the list of integers and category indicators in the list of strings. Assume that the only valid category indicators are words: paper, plastic, and glass - all lowercase letters.
Your program must find the number of items the person recycled in each category and the total weight of recycled items in each category.