python 3.x - Having trouble ending up with negative or no discount -


https://gist.github.com/socialery/bf0f39375150dcfefd3b

for example if enter 0, -47, 8 total comes out correct gives me discount of 0 , final total of 0.

you're not recalculating "total" if invalid input. input mentioned "total" set 0 , never set again. use num * price in print statement.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -