ValueError: too many values to unpack (expected 2) 에러

조회수 1911회
from Module import *
import turtle

inStr = ''
swidth, sheight = 500, 500
tX, tY, txtSize = [0] * 3


turtle.title('글자쓰기')
turtle.shape('turtle')
turtle.setup(width = swidth + 50, height = sheight + 50)
turtle.screensize(swidth, sheight)
turtle.penup()

inStr=getString()

dist=100
angle=0
value = int(360 / len(inStr))

for ch in inStr:

    tX,tY = draw_Circle(angle,dist)

    r,g,b = getRGB()
    txtSize = 20

    turtle.goto(tX, tY)

    turtle.pencolor((r, g, b))
    turtle.write(ch,font = ('맑은고딕', txtSize, 'bold'))

    angle += value

turtle.done()

Module 부분 ( 에러부분만 일부 보여드렸습니다!!!!!!!)

import math

def draw_Circle(angle,distance):
    rad = 3.14 * angle / 180
    tX = distance * math.cos(rad) 
    tY = distance * math.sin(rad) 
    return(rad, tX, tY)

실행 시

line 24, in <module>
    tX, tY = draw_Circle(angle,dist)
ValueError: too many values to unpack (expected 2)

이 부분 tX,tY = draw_Circle(angle,dist) 아니면 모듈부분에서 에러가 있는거 같아요@

1 답변

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)