#!/usr/bin/env python #------------------------------------------------------------------ # cancer.py # # Here is a quickly written Python program that computes the # fraction of individuals among the United States population # for the year 2007 who received a diagnosis of lung cancer. # # execute using: $ python ./cancer.py # # Sources (online): # 2007 Centers for Disease Control and Prevention statistics # and United States Census Bureau figures for 2000 and 2010. # # programmer: ALLAN CRUSE # written on: 08 FEB 2011 #------------------------------------------------------------------ num_diagnoses = 203586.0 us_population = 300548447.0 proportion = num_diagnoses / us_population print print " The probability of a lung cancer diagnosis in 2007", print "= %1.5f " % proportion print