#🔒 Help
15 messages · Page 1 of 1 (latest)
@limber basin
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
is your code the one in the grey box?
it looks like you're looping over it twice?
try removing the stuff after movie['rating']
It responds Error: ‘rating’ not defined
Before getting to that, I notice that you've got [movie['rating'] for movies in .......]
I think you mean for movie, not for movies.
I assume from the photos that you can't copy/paste text from the computer you're running this on, into this discord?
Yeah, i’m sorry 😓
This is a struggle because it’s part a an assignment that builds on its self. 😅
The rating is referring to a variable in a previous definition.
Right. But I'm pointing our that the loop variable is named movies but you're obtaining movie['rating']. I'd expect they need to match. otherwise you're trying to access some variable movie which (a) isn't set anywhere and (b) doesn't track the values from the loop.
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.