Computer Science, asked by dhusnyraj, 3 months ago

What is the correct way to create a function in Python? 

function myfunction()

def myfunction()

create myFunction():

def myFunction():​

Answers

Answered by Sasanksubudhi
8

Answer:

option b is the right answer to your Q As

Answered by kavyapsynergy
0

def myFunction(): is the correct way to create a function in Python  

Function in Python

A function in Python is a collection of connected statements that performs a single task.

Function Syntax:

Def function_name(parameters):

Statement(s)

The following elements make up a function definition:

  • The start of the function header is indicated by the keyword def.
  • A name for the function that can be used to distinguish it from others.  
  • Parameters are arguments to send values to a function.
  • The function header is terminated by a colon (:).  
  • The function body is made up of one or more valid Python statements.  
Similar questions