Question:  For the school bake sale Wendy made pastries. She baked 41 cupcakes and 31 cookies. After the sale she had 32 to take back home. How many pastries did she sell? 

Solution program:
answer=((41.0+31.0)-32.0)
print(answer)

Answer: 40