Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168742
Image: ubuntu2004

\$20 + \$5/drink + \$8/dessert + tax + service

@interact def f(drinks=(1..5), desert=True): cost = 20 + 5*drinks + (8 if desert else 0) cost *= 1.18 cost *= 1.075 print "Dinner" + (" + %s drinks"%drinks if drinks else "") + (" + desert" if desert else "") print "Total: $%s"%ceil(cost)