Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

why is this invalid syntax? can smeone explain please

0 votes
asked Nov 21, 2023 by mariajuliamier17 (120 points)
horas = float(input("cuanto tiempo trabajaste?"))
salario = float(input("cual es tu salario por hora?"))
sueldo-total = float(horas * salario)
print ("tu salario por hora es de: " , sueldo-total)

2 Answers

0 votes
answered Nov 24, 2023 by Peter Minarik (86,240 points)

sueldo-total is not a valid variable name as variables cannot contain dashes (_), among others. You can use underscore (_) instead: sueldo_total

0 votes
answered Nov 24, 2023 by Yonas Fayera (180 points)
Sueldo-total is not correct python variable declaration

it must be sueldo_total
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...