10 PRINT TAB(21);"LIFE EXPECTANCY" 20 PRINT TAB(20);"CREATIVE COMPUTING" 30 PRINT TAB(18);"MORRISTOWN, NEW JERSEY" 40 PRINT:PRINT:PRINT 270 PRINT :PRINT:PRINT 280 PRINT "THIS IS A LIFE EXPECTANCY TEST." 290 PRINT " DO YOU WISH INSTRUCTIONS"; 300 INPUT I$ 310 IF LEFT$(I$,1)="N" THEN 470 320 PRINT:PRINT 340 PRINT " THIS IS A TEST TO PREDICT YOUR LIFE EXPECTANCY. I" 350 PRINT "WILL ASK YOU A SERIES OF SHORT QUESTIONS, WHICH YOU WILL" 360 PRINT "REPLY BY TYPING IN THE CORRESPONDING ANSWER TO THE" 370 PRINT "QUESTION." 380 PRINT 390 PRINT " EXAMPLE: WHAT IS YOUR SEX?" 400 PRINT " M=MALE" 410 PRINT " F=FEMALE" 420 PRINT "'M' AND 'F' ARE THE POSSIBLE REPLIES TO THE QUESTION, ANSWER" 430 PRINT "LIKE THIS:" 440 PRINT " CHOOSE ONE OF THE LETTERS ABOVE? M" 450 PRINT "TYPING AN 'M' SIGNIFIES YOU ARE A MALE." 460 PRINT:PRINT:PRINT 470 R5=1 480 Z=72 490 A$="ABCDEMGHIJKLFNO" 500 GOTO 1700 510 R5=R5+1 520 IF R5>21 THEN 1900 530 DATA "+++SEX+++" 540 DATA "ARE YOU MALE OR FEMALE?" 550 DATA "M= MALE." 560 DATA " F= FEMALE." 570 DATA 2,"MF" 580 DATA "+++LIFE STYLE+++" 590 DATA "WHERE DO YOU LIVE?" 600 DATA "G= IF YOU LIVE IN AN URBAN AREA WITH A POPULATION OVER 2 MIL." 610 DATA "K= IF YOU LIVE IN A TOWN UNDER 10,000, OR ON A FARM." 620 DATA " I= NEITHER." 630 DATA 3,"GKI" 640 DATA "HOW DO YOU WORK?" 650 DATA "M= IF YOU WORK BEHIND A DESK." 660 DATA "L= IF YOUR WORK REQUIRES HEAVY PHYSICAL LABOR." 670 DATA " I= NONE OF THE ABOVE." 680 DATA 3,"MLI" 690 DATA "HOW LONG DO YOU EXERCISE STRENUOUSLY," 700 DATA "(TENNIS, RUNNING, SWIMMING, ETC.)?" 710 DATA "F= FIVE TIMES A WEEK FOR AR LEAST A HALF HOUR." 720 DATA "K= JUST TWO OR THREE TIMES A WEEK." 730 DATA " I= DO NOT EXERCISE IN THIS FASHION." 740 DATA 3,"FKI" 750 DATA "WHO DO YOU LIVE WITH?" 760 DATA "N= IF YOU LIVE WITH A SPOUSE, FRIEND, OR IN A FAMILY." 770 DATA "H= IF YOU'VE LIVED ALONE FOR 1-10 YEARS SINCE AGE 25." 780 DATA "G= FOR 11-20 YEARS." 790 DATA "M= FOR 21-30 YEARS." 800 DATA "E= FOR 31-40 YEARS." 810 DATA " D= MORE THAN 40 YEARS." 820 DATA 6,"NHGMED" 830 DATA "+++PSYCHE+++" 840 DATA "DO YOU SLEEP MORE THAN 10 HOURS A NIGHT?" 850 DATA "I= NO." 860 DATA " E=YES." 870 DATA 2,"IE" 880 DATA "+++MENTAL STATE+++" 890 DATA "M= IF YOU ARE INTENSE, AGGRESSIVE, OR EASILY ANGERED." 900 DATA "L= IF YOU ARE EASY GOING, RELAXED, OR A FOLLOWER." 910 DATA " I= NEITHER." 920 DATA 3,"MLI" 930 DATA "+++HOW YOU FEEL+++" 940 DATA "ARE YOU HAPPY OR UNHAPPY?" 950 DATA "J= HAPPY." 960 DATA "G= UNHAPPY." 970 DATA " I= NEITHER." 980 DATA 3,"JGI" 990 DATA "+++FACTORS+++" 1000 DATA "HAVE YOU HAD A SPEEDING TICKET IN THE LAST YEAR?" 1010 DATA "H= YES." 1020 DATA " I=NO." 1030 DATA 2,"HI" 1040 DATA "+++INCOME+++" 1050 DATA "DO YOU EARN MORE THAN $50,000 A YEAR?" 1060 DATA "G= YES." 1070 DATA " I=NO." 1080 DATA 2,"GI" 1090 DATA "+++SCHOOLING+++" 1100 DATA "J= IF YOU HAVE FINISHED COLLEGE." 1110 DATA "L= IF YOU HAVE FINISHED COLLEGE WITH A GRADUATE" 1120 DATA "OR PROFESSIONAL DEGREE." 1130 DATA " I= NOTHING LISTED." 1140 DATA 3,"JLI" 1150 DATA "+++AGE+++" 1160 DATA "ARE YOU 65 OR OLDER AND STILL WORKING?" 1170 DATA "L= YES." 1180 DATA " I= NO." 1190 DATA 2,"LI" 1200 DATA "+++HEREDITY+++" 1210 DATA "K= IF ANY GRANDPARENTS LIVED TO 85 YEARS OLD." 1220 DATA "O= IF ALL FOUR GRANDPARENTS LIVED TO 80 YEARS OLD." 1230 DATA " I= NO GRANDPARENTS QUALIFY IN THE ABOVE." 1240 DATA 3,"KOI" 1250 DATA "HAS ANY PARENT DIED OF A STROKE OR HEART ATTACK" 1260 DATA "BEFORE THE AGE OF 50?" 1270 DATA "E= YES." 1280 DATA " I= NO." 1290 DATA 2,"EI" 1300 DATA "+++FAMILY DISEASES+++" 1310 DATA "ANY PARENT, BROTHER, OR SISTER UNDER 50 HAS (OR HAD) " 1320 DATA "CANCER, A HEART CONDITION, OR DIABETES SINCE CHILDHOOD?" 1330 DATA "M= YES." 1340 DATA " I= NO." 1350 DATA 2,"MI" 1360 DATA "+++HEALTH+++" 1365 DATA "HOW MUCH DO YOU SMOKE?" 1370 DATA "A= IF YOU SMOKE MORE THAN TWO PACKS A DAY." 1380 DATA "C= ONE TO TWO PACKS A DAY." 1390 DATA "M= ONE HALF TO ONE PACK A DAY." 1400 DATA " I= DON'T SMOKE." 1410 DATA 4,"ACMI" 1420 DATA "+++DRINK+++" 1430 DATA "DO YOU DRINK THE EQUIVALENT OF A " 1440 DATA "QUARTER BOTTLE OF ALCOHOLIC BEVERAGE A DAY?" 1450 DATA "H= YES." 1460 DATA " I= NO." 1470 DATA 2,"HI" 1480 DATA "+++WEIGHT+++" 1490 DATA "A= IF YOU ARE OVERWEIGHT BY 50 POUNDS OR MORE." 1500 DATA "E= OVER BY 30-50 POUNDS." 1510 DATA "G= OVER BY 10-30 POUNDS." 1520 DATA " I= NOT OVER WEIGHT." 1530 DATA 4,"AEGI" 1540 DATA "+++CHECKUPS+++" 1550 DATA "DO YOU? IF YOU ARE A MALE OVER 40 HAVE AN ANNUAL CHECKUP?" 1560 DATA "K= YES." 1570 DATA " I= IF NO OR NOT A MALE OR UNDER 40 YEARS OLD." 1580 DATA 2,"KI" 1590 DATA "DO YOU? IF YOU ARE A WOMAN SEE A GYNECOLOGIST ONCE A YEAR?" 1600 DATA "K= YES." 1610 DATA " I= IF NO OR NOT A WOMAN." 1620 DATA 2,"KI" 1630 DATA "+++CURRENT AGE+++" 1640 DATA "K= IF YOU ARE BETWEEN 30 AND 40 YEARS OLD." 1650 DATA "L= BETWEEN 40 AND 50." 1660 DATA "F= BETWEEN 50 AND 70." 1670 DATA "N= OVER 70." 1680 DATA " I= UNDER 30." 1690 DATA 5,"KLFNI" 1700 FOR Q=1 TO 7 1710 READ Q$ 1720 IF LEFT$(Q$,1)=" " THEN 1750 1730 PRINT " ";Q$ 1740 NEXT Q 1750 PRINT " ";Q$ 1760 READ C,C$ 1770 PRINT "CHOOSE ONE OF THE LETTERS ABOVE"; 1780 INPUT G$ 1790 FOR C2=1 TO C 1800 IF LEFT$(G$,1)= MID$(C$,C2,1) THEN 1830 1810 NEXT C2 1820 GOTO 1770 1830 PRINT 1840 FOR N=1 TO 15 1850 IF LEFT$(G$,1)=MID$(A$,N,1) THEN 1870 1860 NEXT N 1870 M=N-9 1880 Z=Z+M 1890 GOTO 510 1900 PRINT "YOU ARE EXPECTED TO LIVE TO THE AGE OF";Z;"YEARS" 1910 IF Z<60 THEN 1980 1920 FOR Y=60 TO Z STEP 5 1930 READ M$,F$ 1940 NEXT Y 1950 DATA "26%","15%","36%","20%","48%","30%","61%","39%" 1960 DATA "75%","53%","87%","70%","96%","88%","99.9%","99.6%" 1970 PRINT "OUT LIVING ";M$;" OF THE MEN AND ";F$;" OF THE WOMEN." 1980 END