1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mariana [72]
3 years ago
12

A Python programmer is writing a function definition. What syntax should be used?

Computers and Technology
2 answers:
rewona [7]3 years ago
7 0

Answer:

def functionName( arguments ):

statement1

statement2

statement3

Explanation:

Ber [7]3 years ago
6 0

Answer:

Python - Functions

Advertisements

A function is a block of orgaof code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree ofAdvertisement

As you already know, Python gives you many built-in functions like print(), etc. but you can also create your own functions. These functions are called user-defined functions.

Defining a Function

You can define functions to provide the required functionality. Here are simple rules to define a function in Python.

Function blocks begin with the keyword def followed by the function name and parentheses ( ( ) ).

Any input parameters or arguments should be placed within these parentheses. You can also define parameters inside these parentheses.

The first statement of a function can be an optional statement - the documentation string of the function or docstring.

The code block within every function starts with a colon (:) and is indented.

The statement return [expression] exits a function, optionally passing back an expression to the caller. A return statement with no arguments is the same as return None.

You might be interested in
A(n) _______ is text or a graphic you can click to jump to another file or to somewhere else in the same file. quizle
Paul [167]
Hyperlink



______________________________
5 0
3 years ago
The ____ feature automatically locates specific text and then replaces it with desired text. Find and Replace Locator Locate and
jekas [21]
The "Find and Replace" feature automatically locates specific text and then replaces it with desired text.
8 0
4 years ago
Select the correct answer.
saveliy_v [14]

Answer:

its TASCAM porta studio

Explanation: i got it right on edge

6 0
3 years ago
Select the correct answer from each drop-down menu
Oksanka [162]

Answer:

First one is B size because if it's too small or big it might get pixelated or fuzzy, and for the second parr it would be B printable .

Explanation:

7 0
3 years ago
Read 2 more answers
Write a program to create an interface Shape containing the method declarations of area and perimeter. Then, create a class Rect
irakobra [83]

Answer:

Explanation:

An interface is similar to a class, to create an interface we use interface keyword, in an interface there can be abstract methods and constants only,we can not instantiate an interface.All the variables declared inside an interface are public,static and final  by default.

While using interface child class must use implements keyword

We can define an  interface by using below syntax-

<interface> <interface-name>{

}

For example lets create Shpae interface

interface Shape{

public int area(int length, int width);

public int perimeter(int length, int width);

}

Now lets create Rectangle class-

class Rectangle implements Shape{

public int area(int length, int width){

int area = 0;

area = length * width;

return area;

}

public int perimeter(int length, int width);

int perimeter = 0;

perimeter = 2*(length+width);

return perimeter ;

}

6 0
3 years ago
Other questions:
  • The ____ problem-solving cycle involves inputting code to an assembler, translating it to machine language, loading it into a Vo
    10·1 answer
  • Please what's the answer to this
    14·1 answer
  • In object-oriented development, why is it necessary to use drivers and stubs in testing?
    9·1 answer
  • There are two different perspectives in terms of how programs are delivered for different ethnic groups. If an agency offers dif
    14·1 answer
  • What are the benefits of transferable skills check all the boxes that apply
    6·2 answers
  • What’s the purpose of balancing or monitoring your checking account?
    12·2 answers
  • Which statement assigns the value 98 to the variable myScore in Python?
    14·2 answers
  • Is social media bringing people together or cause in sepretation?​
    11·2 answers
  • How does the technology affect you daily living? Give situations where you use technology and how it helped you.​
    5·1 answer
  • Rr lyrae stars pulsate, but with shorter periods and lower luminosities than cepheids. true false
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!