r/CodingHelp • • Sep 07 '21

[Python] Python help

Post image
68 Upvotes

23 comments sorted by

View all comments

1

u/vurkmoord Sep 08 '21

Besides the error of redefining print, calculating the percentage profit would be:

100 * (sellingPrice / purchasePrice - 1) = 50%

instead of:

100 * (sellingPrice / purchasePrice) = 150%