Oct-13-2017, 07:25 PM
(This post was last modified: Oct-13-2017, 07:28 PM by willianramos.)
##algorithm that reads a person's salary and performs an increase
salary = float(input("Enter your salary: "))
if salary > 2000:
gain = (salary + (salary * 0,10))
print("Your new salary is $%-6.2"%gain)
##Error message
Traceback (most recent call last):
File "C:\Users\Usuario\Desktop\EstatÃstica\Python\Scripts(aula)\Twelve.py", line 3, in <module>
gain = (salary + (salary * 0,10))
TypeError: unsupported operand type(s) for +: 'float' and 'tuple'
salary = float(input("Enter your salary: "))
if salary > 2000:
gain = (salary + (salary * 0,10))
print("Your new salary is $%-6.2"%gain)
##Error message
Traceback (most recent call last):
File "C:\Users\Usuario\Desktop\EstatÃstica\Python\Scripts(aula)\Twelve.py", line 3, in <module>
gain = (salary + (salary * 0,10))
TypeError: unsupported operand type(s) for +: 'float' and 'tuple'