Apr-19-2020, 01:47 AM
(This post was last modified: Apr-19-2020, 01:47 AM by Shahmadhur13.)
money = int(input('amount of money: ')) multiplier = (input('enter t or h for thousands or hundreds: ')) if multiplier == "t": print(money*1000) else: print(money*100)every input,python treat it as a string only so str() was not needed.
money = int(input('amount of money: ')) t = money * 1000 h = money * 100 multiplier =(input('enter t or h for thousands or hundreds: ')) if multiplier =="t": print(t) else: print(h)variable assignment was wrong as python execute code line by line and t and h you recieve from input are string so you have to use "" for using == operator.
Professional Dentist(32years) fell in love with Python during COVID-19 Lockdown.
"Nothing can stop you from learning new things except your own will"
"Nothing can stop you from learning new things except your own will"