Question: 2. Write a script that will create a (random) vector of ages (real numbers, not integers). The script should contain the following prompts: -
2. Write a script that will create a (random) vector of ages (real numbers, not integers). The script should contain the following prompts: - the user will provide the number of elements in the vector. - the user will provide the age of the oldest person in the group. For example: Enter the number of persons in the group: 50 Enter the age of the oldest person: 37 Save the vector containing the ages in a ".dat file" called ages_vector.dat
Step by Step Solution
3.44 Rating (151 Votes )
There are 3 Steps involved in it
Here is a Python script that fulfills your requirements python import random Get user input for th... View full answer
Get step-by-step solutions from verified subject matter experts
