Concept explainers
The Social Security Administration maintains an actuarial life table that contains the probability that a person in the United States will die (http:// www.ssa.gov/OACT/STATS/table4c6.html). The death probabilities from this table for 2009 are stored in the file LifeDeathProbability.txt and it is included on the website for the book. There are three values for each row, the age, death probability for a male, and death probability for a female. For example, the first five lines are:
0 0.006990 0.005728 1 0.000447 0.000373 2 0.000301 0.000241 3 0.000233 0.000186 4 0.000177 0.000150 |
This says that a 3 year old female has a 0.000186 chance of dying. Write a
If the simulation reaches age 120 then stop and predict that the user will live to 120. This program is merely a simulation and will give different results each time it is run, assuming you change the seed for the random number generator.
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
Problem Solving with C++ (10th Edition)
Additional Engineering Textbook Solutions
Starting Out with C++: Early Objects
Introduction To Programming Using Visual Basic (11th Edition)
Programming in C
Artificial Intelligence: A Modern Approach
Java: An Introduction to Problem Solving and Programming (8th Edition)
Java How To Program (Early Objects)
- using the data set from the link: https://www.kaggle.com/osmi/mental-health-in-tech-survey?select=survey.csv Write Python code to return the following data:• Select all rows where the Age is less than 1• Select all rows where the Age is greater than 99arrow_forwardThe code below creates a table for the outcomes when 4 dice are rolled, and stores them as a DataFrame. Extend the code to print out the number of ways to obtain 15 as the total when 4 dice are rolled simultaneously.arrow_forwardThe accompanying Gradebook spreadsheet contains a partially completed spreadsheet model for computing and summarizing the grades for a class. Complete the spreadsheet model by entering and copying the formulas in the appropriate cells. Cell range H4:H17 should contain the course number grades using the grades from exams and homework assignments and the grade allocation in row 22. Cell range I4:I17 should contain the course letter grades based on the grading criteria in cell range K4:L8. Rows 19, 20, and 21 should contain the average, maximum, and minimum exam, homework, and course number grades. You should only enter each formula once and copy the formulas to other cells. Gradebook Student ID Exam 1 Exam 2 Exam 3 Homework 1 Homework 2 Homework 3 Course Number Grade Course Letter Grade Grading Criteria 000-01-5562 60 50 40 79 92.0 76 0 F 000-01-2667 80 71 70 84 81.0 90 60 D 000-01-7376 65 65 65 60 90.0 94 70 C 000-01-1986…arrow_forward
- Some rows of the STUGRADE table of a school are shown below: STU_CODE CLS_CODE GRADE YEAR 291 111 3.1 2010 938 101B 2.3 2011 931 M101 3.3 2040 291 M101 3.4 2018 190 111 2.0 2021 931 321 3.9 2003 Suppose that STU_CODE is the student code (foreign key) and CLS_CODE is the class code (foreign key). Which of the following computes the average for each year of the student with code 931? a. SELECT AVG(GRADE) FROM STUGRADE WHERE STU_CODE = 931 GROUP BY YEAR b. SELECT AVG(GRADE) FROM STUGRADE WHERE STU_CODE = 931. c. SELECT AVG(GRADE) FROM STUGRADE GROUP BY STU_CODE = 931 d. SELECT AVG(GRADE) FROM STUGRADE WHERE STU_CODE = 931 GROUP BY AVG(GRADE)arrow_forwardcomplete the data system for citywide taxi company. now, the information for each taxi is expanded to include: taxi id (such as ctc0001), the driver’s name, the maker of the car (such as ford), the model of the car (such as escape), the color of the car (such as black), the license number (such as hxt 4578), the number of passages the car served in the entire shift (integer type, this field will be left empty for this project). your c++ program will (with array of class object): define a class for the car with all members of variable mentioned above as private; write all necessary class member functions to access those member variables (write or read); read up to 50 records of data from the keyboard (provide a method to end the input before reaching 50 records); (1 points) save all records inputted from step 3 to a disk file called ctc.dat. In cpparrow_forwardcomplete the data system for citywide taxi company. now, the information for each taxi is expanded to include: taxi id (such as ctc0001), the driver’s name, the maker of the car (such as ford), the model of the car (such as escape), the color of the car (such as black), the license number (such as hxt 4578), the number of passages the car served in the entire shift (integer type, this field will be left empty for this project). your c++ program will (with array of class object): define a class for the car with all members of variable mentioned above as private; write all necessary class member functions to access those member variables (write or read); ) read up to 50 records of data from the keyboard (provide a method to end the input before reaching 50 records); save all records inputted from step 3 to a disk file called ctc.dat.arrow_forward
- Models are used for a variety of purposes. Sort the models into groups.arrow_forwardScenario: You are the inventory manager of an automotive parts distributor. From experience, you know that you will need to reorder parts when inventory reaches a certain level. In the Parts spreadsheet, expand the spreadsheet to show that you will need to reorder parts when they get below the order point. Modify the spreadsheet to add a column saying "order more" or "available." Write the formula that you used in cell E2 to accomplish this:arrow_forwardThe box plots show student results in Maths and Science test scores. What is the lowest mark in the Science test? Compare the distribution of the marks in the Maths test and marks in theMaths test.arrow_forward
- The Movie table has the following columns: ID - positive integer Title - variable-length string Genre - variable-length string RatingCode - variable-length string Year - integer Write ALTER statements to make the following modifications to the Movie table: Add a Producer column with VARCHAR data type (max 50 chars). Remove the Genre column. Change the Year column's name to ReleaseYear, and change the data type to SMALLINT.arrow_forward123 4 5 6 7 8 A B Paper Type Name Letter Stock 65lb Cover Stock Premium White Copy Paper 2 Hole punch Letter Ultra-White Cardstock C Quantity 100 17 25 66 87 DE Discount 25% 5% 10% 15% 20% F Order Discounts G Minimum Quantity Discount 0 25 50 75 100 5% 10% 15% 20% 25% In the above spreadsheet, create a formula in cell D4 that uses the VLOOKUP function with the table array $F$4:$G$8. The formula will determine the applicable discount for each paper type order. You should be able to autofill this formula down through cells D4:D8.arrow_forwardList items have an index number. In the following list, which item has the index number of 3? ["John", "Harry", "Jesse", "John", "Harry", "Harry"] Select one: a. None O b. "John" O c. "Jesse" O d. "Harry"arrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage