runtime
83 / 500
question 83 Functions · easy

Loyalty points for an order

Runtime Market gives loyalty points on every order: one point per whole dollar spent (cents don't count). Members earn double. Any order of 100 dollars or more earns a flat 50 bonus points on top, which is not doubled.

Functionloyalty_points(amount, member)
amountthe order total in dollars, a positive number such as 64.47
memberTrue or False
Returnsthe points as a whole number
Examples
callloyalty_points(64.47, False)returns64
callloyalty_points(64.47, True)returns128
callloyalty_points(150, False)returns200

Loading your progress…

Loyalty points for an order — Python practice · Runtime