#๐Ÿ”’ Im Brazilian. Who can help me?

30 messages ยท Page 1 of 1 (latest)

brittle panther
hearty escarpBOT
#

@brittle panther

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.

brittle panther
#

I start in python recently

#

I dont find what IS The error here

strange saddle
#

Is the answer wrong? Are you getting an error?

brittle panther
strange saddle
brittle panther
#

And i have a question, what The Code async do?

strange saddle
#

Oh, it's just a dumb app then. The fairly obvious error that I see is your code doesn't have any indentation.

brittle panther
strange saddle
#

I don't know of any mobile apps (I used QPython, but it's not amazing). Learning on a mobile isn't ideal. You should at least use an app that gives proper error messages.

#

This should have given you an error message that said something like IndentationError: Expected block, and the line the error was on.

#

!e

def func():
print('This will fail')
hearty escarpBOT
# strange saddle !e ```python def func(): print('This will fail') ```

:x: Your 3.13 eval job has completed with return code 1.

001 |   File "/home/main.py", line 2
002 |     print('This will fail')
003 |     ^^^^^
004 | IndentationError: expected an indented block after function definition on line 1
strange saddle
#

Like that

#

That should have been written as

def func():
   print('This will not fail')
trim sparrow
#

I can't imagine programming on a phone

strange saddle
#

I actually learned C++ on a phone, but I had a massive Samsung Note with a kickstand case, and a portable keyboard.

glossy scaffold
strange saddle
# brittle panther I dont find what IS The error here

Back to this code, note how you don't have an indentation after the def line. Statements like def and if expect an indented "block" after them. The indented lines are "inside" of the if/def. If you don't have any indented lines after a def, you're saying that the function doesn't contain any code, and that's not allowed by the syntax.

strange saddle
#

C4Droid was decent for a phone app, but wasn't near as good as what I could have used on a PC.

glossy scaffold
#

Ive heard PyDroid i think mentioned more than a few times that people use, but no experience with it myself

serene bone
#

If I need to run a small amount of python or ssh from my phone I just use termux and it works well enough

dark quiver
#

if you absolutely must run it in a mobile device, you might as well use something that runs in the web tbh
(whenever it's by running on the server or client-side WASM)

e.g. Google Colab

#

but yeah... I cannot recommend programming on a mobile device by any means

hearty escarpBOT
#
Python help channel closed for inactivity

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.