#๐Ÿ”’ Code review

22 messages ยท Page 1 of 1 (latest)

earnest cloak
#

Don't understand the code that much.

whole escarpBOT
#

@earnest cloak

Python help channel opened

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.

earnest cloak
#

what's with the abc variable and index thingy

ashen bloom
#

abc variable is just a list [,"a", "b", "c"]
When you call .index(letter) on that list, you will just find the index number where the given letter is located

#

!e

abc = ["a", "b", "c"]

print(abc.index("a"))
print(abc.index("b"))
print(abc.index("c"))
whole escarpBOT
#

@ashen bloom :white_check_mark: Your 3.12 eval job has completed with return code 0.

001 | 0
002 | 1
003 | 2
earnest cloak
#

these numbers are basically the ones in [] brackets

earnest cloak
#

huh?

#

@ashen bloom but why even creating the abc variable

wise panther
#

What do you propose doing instead of that?

ashen bloom
#

Actually a good question, let me read the task a few more times ๐Ÿ˜‚

wise panther
#

You're using it to see what the index of the coordinate is on your map from the letters list

earnest cloak
ashen bloom
#

There is more text in the instructions that we cannot see?

earnest cloak
#

the rest is basically jusst a hint

ashen bloom
#

I hope you understood the part we explained already.
From what I can read tho, I don't understand the context of why you need that variable in the first place

earnest cloak
#

huh

#

Leandro seems skilfull

#

@wise panther

whole escarpBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.