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)
- The following sections provide light on the variations between the MonthCalendar and the DateTimerPicker.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 distinction between MonthCalender and DateTimerPicker is explained below.arrow_forward
- List 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_forwardChiralitydef is_left_handed(pips): Even though this has no effect on fairness, pips from one to six are not painted on dice any which way, but so that the pips on the opposite faces always add up to seven. (This convention makes it easier to tell when someone tries to use gaffed dice that leave out some spot values.) In each corner of the cube, one value from each pair of opposites 1-6, 2-5 and 3-4 meets two values from the other two pairs of opposites. The math works out correctly in for the 23 = 8 corners of the cube. This still leaves two possibilities how to paint these pips. Look at the corner shared by the faces 1, 2, and 3, and read these numbers clockwise around that corner starting from 1. If these three numbers read out as 1-2-3, that die is left-handed, and if they read out as 1-3-2, that die is right-handed. Analogous to a pair of shoes made separately for the left and right foot, left- and right-handed dice are in one sense identical, yet no matter how you twist and turn,…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_forward
- There are 45 tickets, each one has a digit between 1 and 9 on it and each has a letter A, B, C, D, or E on it. Here is a table of all the tickets: 3. 4 7 8 A1 A2 АЗ A4 A5 A6 A7 A8 A9 B B1 B2 B3 B4 B5 B6 B7 B8 B9 C C1 C2 C3 C4 C5 C6 C7 C8 C9 D1 D2 D3 D4 D5 D6 D7 D8 D9 E E1 E2 ЕЗ E4 E5 E6 E7 E8 E9 You pick three tickets at random. What it the probability that all of them have the number 6? Multiple Choice 9/45 C(45,3) 10 C(45,3) C(5, 3) C(45,3) C(9, 3) C(45.3)arrow_forwardCreate a data type that allows you to insert, remove the maximum, and delete the minimum (all in logarithmic time), as well as locate the maximum and find the minimum (both in constant time). Use two piles as a hint.arrow_forwardIn PYTHON Print values from the Goal column only Print values only for columns: Team, Yellow Cards and Red Cards Find and print rows for teams that scored more than 6 goals Select the teams whose name start with a G Print values only for columns Team and Shooting Accuracy , and only for rows in which the team is either of the following: England, Italy and Spain Find and print rows for teams that scored more than 6 goals and at least 4000 passesarrow_forward
- There's a "users" table and "messages" table included in the image. Implement a SQL query to return which users have more than 10 unread messages (NULL in the "date_read" column).arrow_forwardThere's a "users" table that has more than 1M rows of "users" information. The image below are the first 3 rows.Implement a SQL query that retrieves the "email" and "friend_count" of the "user_id" with the most friends.arrow_forwardCode to create javaarrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L