Ask coding questions

← Back to all posts
How do I fix my DEF error?
MatthewADev

(NOTE: I'm not using REPL because it doesn't have the ping command, i'm using something else but it is python 3.8)
So i'm trying to create a simple IP pinger but i'm getting a error I never got before.

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
MatthewADev
Comments
hotnewtop
Coder100

but if you want an empty function use pass

doesn't seem like it but as a reference.

also nice solarized dark vscode (probably vscode)

MatthewADev

@Coder100 It works, thanks :D! and i'm using google cloud shell :troll:

Coder100

fffffffffffffff @2I9

Coder100

you forgot to indent!

lol

cuber1515

@2I9 what does the error say

cuber1515

Oh wait nvm. Ok so I might be wrong but I think you have to put async before def so it should look like this:

MatthewADev

didn't work D:
"invalid syntax" line 3

cuber1515

@2I9 ok. I realized someone else answered the question after I had already sent it btw.