isn't the logic reverse - i.e. if the amount is 5000, in thousands it will be 5 (i.e. divide, not multiply by 1000)?
Second in either case it's better to do one calculation - requested by user, not all calculations in advance
Second in either case it's better to do one calculation - requested by user, not all calculations in advance
money = int(input('amount of money: ')) multiplier = input('enter t or h for thousands or hundreds: ') # ne need of extra brackets if multiplier == "t": print(money / 1000) else: print(money / 100)even more pythonic would be
scales = {'t':1000, 'h':100} # you can expand this as you wish, without need to change rest of code money = int(input('amount of money: ')) user_choice = input('enter t or h for thousands or hundreds: ') # ne need of extra brackets divisor = scales.get(user_choice, 1) print(money / divisor)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs