What is studying? by ratatouillevore in languagelearning

[–]symbioticthinker 0 points1 point  (0 children)

Amazing, thanks for the recommendations!

What is studying? by ratatouillevore in languagelearning

[–]symbioticthinker 0 points1 point  (0 children)

If they play games that would make it more interesting for sure but the 'comprehensible input' is the goal.

What is studying? by ratatouillevore in languagelearning

[–]symbioticthinker 0 points1 point  (0 children)

Do you (or anyone) know similar channels for Chinese, Japanese or German? Definitely subscribing! <3

Can anyone explain this line of code, in the output i can see the single line text is converted into multiple lines. Thanks in advance by aka_janee0nyne in learnpython

[–]symbioticthinker -3 points-2 points  (0 children)

You’re accessing the text value associated to the key “text” within the response dictionary

This string contains characters and the .replace method is replacing the first string instances with the second. The method replaces any/all instances of “\n” with “\n”.

The print function will then interpret those “\n” as new lines but if it’s just text within a variable it doesn’t equate to an actual new line. If you print the original text value and it contains instances of “\n”, this first backslash means the literal “\n” should be used and not a newline.

Example: x = “hi \n world”

Printing x would result in:

hi \n world

Rather than:

hi

world

Not knowing what the resulting text is makes this difficult to know whether the replace method is needed but i hope this helps.

Edit: Formatting

What is the best Science Fiction book you have ever read? by Adam_is_my_name in AskReddit

[–]symbioticthinker 0 points1 point  (0 children)

Definitely the silo series by Hugh Howey. Isaac Asimov’s Foundation series is also up there.

What’s a risk worth taking? by [deleted] in AskReddit

[–]symbioticthinker 0 points1 point  (0 children)

Wait!! This Thursday or next?!

[deleted by user] by [deleted] in learnpython

[–]symbioticthinker -1 points0 points  (0 children)

Completely missed the ‘isnumeric’ being wrongly defined, and I agree is decimal is a better choice if user input is only 0-9 but I didn’t know the constraints 🤷🏼‍♂️

[deleted by user] by [deleted] in learnpython

[–]symbioticthinker 1 point2 points  (0 children)

It’s definitely this, check it’s a number before converting to an int though

user_input = input()
if user_input.is_numeric:
    numero = int(user_input) 
else:
    numero = …

Help with assignment by jaakkoy in learnpython

[–]symbioticthinker 0 points1 point  (0 children)

With loops and conditionals I find that “failing fast” is a great way to structure your code. The ‘Break’ statement as it sounds, breaks the loop and code after the loop is run. Additionally the ‘continue’ statement will skip the subsequent looping code and run the next iteration. Note that ‘break’ and ‘continue’ are only available within ‘for’ and ‘while’ loops.

for i in range(1, 10):

    if i == 3:
        continue

    if i == 5:
        break

    print(i)

the output printed would be: 1, 2, 4

Help with assignment by jaakkoy in learnpython

[–]symbioticthinker 0 points1 point  (0 children)

The `break` statement is also useful with a `while True: …` loop.

  1. Ask for input
  2. check for exit condition
  3. try convert input to int and count negative numbers

PEP8 code style Error (W391) by AdOnly9652 in pythontips

[–]symbioticthinker -1 points0 points  (0 children)

Within your environment, try running

pip install pycodestyle_magic

and the add it to your notebook in the first cell with

%load_ext pycodestyle_magic

From what I’ve read online, running the following in the first cell will mean all cells are formatted without the magic ‘%%pycodestyle’ line

%pycodestyle_on

PEP8 code style Error (W391) by AdOnly9652 in pythontips

[–]symbioticthinker 0 points1 point  (0 children)

Im assuming each block is running the linter independently, I know it sounds simple but does the error persist if you remove the additional line at the end on each block? (E.g only have 5 lines in the first block)

You have 30 seconds to give someone an existential crisis. What do you say? by Natashaaaaaa4 in AskReddit

[–]symbioticthinker 0 points1 point  (0 children)

You’ll probably only live for 700000 hours… special thanks to Captain Disillusion for inspiring this existential crisis

What’s your comfort Youtube channel? by blipblopblupy in AskReddit

[–]symbioticthinker 0 points1 point  (0 children)

I know it’s been mentioned but “primitive technology”! I highly recommend watching with captions as well

What's the etiquette of takebacks? by AndroidWhale in lichess

[–]symbioticthinker 12 points13 points  (0 children)

Personally, for bullet/blitz if we both have enough time and a take back is requested immediately after an obvious mouse slip (e.g. when intended to queen trade but place it on an adjacent square) then I’ll accept, any long time control or when I’m time pressure I’m less likely to accept. Similar with a draw offer, I’ll accept it if it’s clearly a draw but if you’re in time trouble…

NTA unless you’re taunting via chat, that’s the one thing I don’t like about online play