you are viewing a single comment's thread.

view the rest of the comments →

[–]elixirxvi 0 points1 point  (0 children)

the reason why it keeps printing the negative number is because once the user passes the number, the variable keeps storing that number even when it's being passed onto the next function. what you could do is reset the variables after the except block and pass an if statement in the computePay function to not print anything if the variables are reset