Question: PLEASE PLEASE PLEASE DONT USE AI HELP ME PLEASE : ( please add pseudocode for the steps program 7 _ 1 . py PROGRAM OBJECTIVE
PLEASE PLEASE PLEASE DONT USE AI HELP ME PLEASE :
please add pseudocode for the steps
programpy
PROGRAM OBJECTIVE
The objective of this assignment is to create a Python program that performs various operations on a list of randomly generated numbers representing ages of a population of cats in a kennel. The program should be able to sort, print, and perform calculations on this list to provide insights on the population's age distribution.
DELIVERABLES
A Python program named programpy
The script should include a main function and a custom valuereturning function
This program shall also meet all requirements stated in the assignment requirements section above and the evaluation criteria stated in the section below and will be scored using the assignment rubric.
INSTRUCTIONS
In the main function of your script, follow these steps:
Use a list comprehension to generate random integers all from to inclusive. These represent the ages of a population of cats.
Pass the list as the sole argument to the custom valuereturning function.
In the custom function:
Sort the list in descending order
Return the sorted list to main
Back in main:
Using loops print a by representation of the ages returned by the custom function. The ages should be in descending order and evenly spaced. After the loop terminates use the builtin sum function to determine the sum of all ages, and then print the sum.
Use builtin functions to determine the ages of the oldest and youngest cats, then print their ages.
Determine the average age by making use of the sum of all ages referenced above, then print the average age so that two decimal positions are included.
Make additive use of the count method to count the number of kittenaged cats from the original list of ages whose ages are less than or equal to then print the count.
Use a list comprehension to create a list of primeaged cats from the original list of ages whose ages are greater than or equal to and less than or equal to Use a builtin function with the list as an argument to determine the count of primeaged cats and then print the count.
Do the same for primeage cats whose ages are greater than or equal to and less than or equal to
Do the same for matureaged cats whose ages are greater or equal to and less than or equal to
Do the same for senioraged cats whose ages are greater or equal to and less than or equal to
Dothe same for super senioraged cats whose ages are greater or equal to
ADDITIONAL EVALUATION CRITERIA
In addition to the requirements for this module stated in the section above, your program will also be evaluated on the following criteria:
Accuracy of results
Efficiency of your code
Proper use of Python builtin functions and methods
Clear and wellstructured code
The program should handle input and output correctly, with prompts and output formatted as in the example inputoutput In IDLE under settings, set the Font Face to a monospaced font such as Courier New for the purpose of checking alignment.
example inputOutput
Sum of all ages:
Oldest age:
Youngest age:
Average age:
Number of kittens:
Number of prime aged cats:
Number of mature aged cats:
Number of senior aged cats:
Number of super senior aged cats:
PROGRAM OBJECTIVE
The objective of this assignment is to create a Python program that performs various operations on a list of randomly generated numbers representing ages of a population of cats in a kennel. The program should be able to sort, print, and perform calculations on this list to provide insights on the population's age distribution.
DELIVERABLES
A Python program named programpy
The script should include a main function and a custom valuereturning function
This program shall also meet all requirements stated in the assignment requirements section above and the evaluation criteria stated in the section below and will be scored using the assignment rubric.
INSTRUCTIONS
In the main function of your script, follow these steps:
Use a list comprehension to generate random integers all from to inclusive. These represent the ages of a population of cats.
Pass the list as the sole argument to the custom valuereturning function.
In the custom function:
Sort the list in descending order
Return the sorted list to main
Back in main:
Using loops print a by representation of the ages returned by the custom function. The ages should be in descending order and evenly spaced. After the loop terminates use the builtin sum function to determine the sum of all ages ADDITIONAL EVALUATION CRITERIA
In a
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
