I am trying to create a game where the user see a map of the US and then enters the states one by one and if they get it correct the name will move on top of the state.
Currently, I am getting the error TypeError: argument of type method is not iterable.
I believe that the error is coming from the separate csv file with all of the states inside it:
I am trying to create a game where the user see a map of the US and then enters the states one by one and if they get it correct the name will move on top of the state. Currently, I am getting the error TypeError: argument of type method is not iterable. I believe that the error is coming from the separate csv file with all of the states inside it:
[code]state,x,y Alabama,139,-77 Alaska,-204,-170 Arizona,-203,-40 Arkansas,57,-53 California,-297,13 Colorado,-112,20 Connecticut,297,96 Delaware,275,42 Florida,220,-145 Georgia,182,-75 Hawaii,-317,-143 Idaho,-216,122 Illinois,95,37 Indiana,133,39 Iowa,38,65 Kansas,-17,5 Kentucky,149,1 Louisiana,59,-114 Maine,319,164 Maryland,288,27 Massachusetts,312,112 Michigan,148,101 Minnesota,23,135 Mississippi,94,-78 Missouri,49,6 Montana,-141,150 Nebraska,-61,66 Nevada,-257,56 New Hampshire,302,127 New Jersey,282,65 New Mexico,-128,-43 New York,236,104 North Carolina,239,-22 North Dakota,-44,158 Ohio,176,52 Oklahoma,-8,-41 Oregon,-278,138 Pennsylvania,238,72 Rhode Island,318,94 South Carolina,218,-51 South Dakota,-44,109 Tennessee,131,-34 Texas,-38,-106 Utah,-189,34 Vermont,282,154 Virginia,234,12 Washington,-257,193 West Virginia,200,20 Wisconsin,83,113 Wyoming,-134,90 < /code> Но я не совсем уверен.from turtle import Turtle, Screen import pandas
turtle = Turtle() screen = Screen() screen.title("U.S State Game Guesser") image = "blank_states_img.gif" screen.addshape(image) screen.setup(750, 500)
turtle.shape(image)
data = pandas.read_csv("50_states.csv") states = data.state.to_list
user_answer = screen.textinput(title="Guess the state", prompt="What's the states name?").title()
if user_answer in states: t = Turtle() t.hideturtle() t.penup() state_data = data[data.state == user_answer] t.goto(int(state_data.x, state_data.y)) t.write(state_data.state) else: pass
screen.mainloop() [/code] Может ли кто -нибудь оказать мне небольшую помощь в решении этой проблемы, поскольку я не могу найти никого, у кого была такая же проблема?
Конечно, у меня есть еще один вопрос относительно типов EmptyList, SingleList и ArrayList...
Идея заключается в том, что я могу использовать их при написании своего CircularList, который должен работать с приведенными выше списками: мой CircularList...
У меня есть настраиваемое поле профиля пользователя «association_id». Я вижу поле базовой таблицы базы данных wordpess (usermeta) с «meta_key» как «association_id» и «meta_value», независимо от того, что я поддерживаю для каждого пользователя....
У меня есть AddWorkoutView, и я пытаюсь создать несколько форм, похожих на то, что Apple сделала с формой листа «Добавить новый контакт».
Сейчас я пытаюсь добавить форму, более сложную, чем форма. простое TextField (что-то похожее на «добавить...