Syntaxerror: invalid syntax, somebody help me!

Asked

Viewed 84 times

-6

I can’t identify the errorinserir a descrição da imagem aqui

someone could tell me where it is!

  • 2

    missing the two points in the function declaration.

  • Please click on [Edit] and put the code as text. Putting it as an image is not ideal, understand the reasons reading the FAQ.

2 answers

1

You have to put two points when declaring function, like this:

def derivadas(temps, A):

0


Defining a Function:

You can define functions to provide the required functionality,
here are simple rules for defining a function in Python.

  • Function blocks start with the def keyword followed by the name of the function and parentheses (()).
  • Any input parameters or arguments should be placed within these parentheses. You can also set parameters within in these parentheses.
  • The first instruction of a function can be an optional instruction - the function documentation string or docstring.
  • The code block inside each function starts with two points (:) and is backward.
  • The statement Return [expression] exits a function, returning optionally an expression to the caller. A return statement without arguments is the same as returning None.

Example of the correct syntax:

def minhaFunção( params ):

See more about this here.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.