Please send questions to st10@humboldt.edu .

from profit_ex import *

# contract: diff_profits1: void -> void
# purpose: to print the profits for ticket
#          prices in the range [4.0, 5.0],
#          in dime increments in the form of a simple table
# example: not really applicable; this simply
#          prints the profits for these ticket
#          prices to the screen


def diff_profits1():
    # print out a header

    print ""
    print "Ticket price\tprofit"    # \t is a tab character
    print "------------\t------"

    # print out all the profits for ticket prices from $4 to $5
    # in dime increments

    print "$4.00\t\t$" + str( profit(4.0) )
    print "$4.10\t\t$" + str( profit(4.1) )
    print "$4.20\t\t$" + str( profit(4.2) )    
    print "$4.30\t\t$" + str( profit(4.3) )
    print "$4.40\t\t$" + str( profit(4.4) )
    print "$4.50\t\t$" + str( profit(4.5) )
    print "$4.60\t\t$" + str( profit(4.6) )
    print "$4.70\t\t$" + str( profit(4.7) )
    print "$4.80\t\t$" + str( profit(4.8) )
    print "$4.90\t\t$" + str( profit(4.9) )
    print "$5.00\t\t$" + str( profit(5.0) )