rite a program that reads the data of numbers shown below, does some math, then displays the output below on the screen. And then edit the program to also write the results of the first program to a different file. (Note: not to input the data of numbers you used in the first program, because that would replace your data.) You must write a program using the specified code below. Write a code using the following : def main(): # Add code that reads the numbers, # Calculate the total number of pets., # the average #, the minimum #, the maximum # # displays those numbers as specified in the instructions.
Write a program that reads the data of numbers shown below, does some math, then displays the output below on the screen. And then edit the program to also write the results of the first program to a different file. (Note: not to input the data of numbers you used in the first program, because that would replace your data.) You must write a program using the specified code below.
Write a code using the following :
def main():
# Add code that reads the numbers,
# Calculate the total number of pets.,
# the average #, the minimum #, the maximum #
# displays those numbers as specified in the instructions.
main()
The required output of the first program:
The total Number of families:
The total number of kids:
The average number of kids per family:
The maximum number of kids in a family:
The minimum number of kids in a family:
Data of numbers:
6
3
1
9
2
2
0
0
2
1
2
1
4
1
5
1
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images