Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 10 Online
OpenStudy (anonymous):

I was listen to the lecture on Itune lecture 5. i am trying to get a function to work but having some problem. here is the (function if c | = ' ': when i run the module i get an error,File "C:\Users\altonbai27\mystuff\TEST.py", line 114, in translate if c |+ ' ': TypeError: bad operand type for unary +: 'str'. how to solve this problem thanks in advance

OpenStudy (anonymous):

problem is slove went over the code from the lecture and findthe right information

OpenStudy (vaboro):

I guess concatenation can be done on strings only whereas you may try to concatenate a string and other value like int or float

OpenStudy (anonymous):

If it's solved, you should close the question so that it doesn't linger on the list. Cheers!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!