Traceback (most recent call last):
File "C:/Python34/exam/dongwon.py", line 23, in <module>
emp=plus(num,num2)
File "C:/Python34/exam/dongwon.py", line 6, in plus
y-=1
TypeError: unsupported operand type(s) for -=: 'str' and 'int'
이 오류가 나는데 타입이 틀리다고 하는것같은데 어느부분을 고쳐야할까요..
초보초보라..ㅠ
함수사용을 없애버릴까...
똑같은데 .. 지금은 일단 값은 나오는데 convert int object to str implicitly가 나오네.. 어느 숫자를 입력하든..
전달인자로 int주었는데 return 할때는 문자로 돌아오나요? str을 각각 붙이니 해결되네요
아 고치다가 내가 멍청하게 쓴것들은 다시 고쳣어요 x*=x로 if문 에서는 0이아니라 1이 출력되고 맨 마지막 print문 없에고 else 안에다가 print("x의y승은" +str(plus(num,num2) 로요
음.. 일단 알려주셔서 감사합니다 요건 힘껏찾아봐야지...