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
Neko [114]
3 years ago
10

What happens if two functions are defined with the same name, even if they are in different arguments within the same .py files?

Computers and Technology
1 answer:
yan [13]3 years ago
7 0

Answer:

Following are the code to this question:

def data(a):#defining method data that accepts parameter

   print (a)#print parameter value

def data(b):#defining method data that accepts parameter

   print (b)#print parameter value

x=input("enter value: ")#defining variable x that5 input value from user

print(data(x))#call method data

Output:

enter value: hello..

hello..

None

Explanation:

  • As the above code, it is clear defines that python doesn't support the method overloading because More than one method can't be specified in a python class with the same name and python method arguments have no type.
  • The single argument method may be named using an integer, a series, or a double value, that's why we can say that it is not allowed.
You might be interested in
3. What is the purpose of the conclusion in an expository essay? (1 point)
Fittoniya [83]
A it makes sense and the conclusion is the wrap up of the essay
7 0
4 years ago
Read 2 more answers
Can anyone help me to write an example for html language​
ivann1987 [24]
No i cannot bcs i dont know
3 0
3 years ago
Read 2 more answers
Write a program that prompts the user to input the decimal value of a double and outputs the number rounded to the nearest integ
KengaRu [80]

Answer:

#include <bits/stdc++.h>

using namespace std;

int main() {

double n;

cout<<"Enter a decimal number: ";

cin>>n;

int Round= floor((n- floor(n))*2);

if(Round==0)

{

n= floor(n);

}

else n= ceil(n);

cout<<n;

return 0;

}

5 0
4 years ago
Jack is part of the software quality assurance team in a company. Which activity should Jack perform as a part of software quali
gizmo_the_mogwai [7]

Answer:

C - testing

Explanation:

quality assurance is another name for verifying something. so when you verify software, you test the software.

3 0
3 years ago
Assume that there is a class called BankAccountHolder that represents an individual member of a bank. There is also a BankAccoun
Elina [12.6K]

Answer:

Aggregation

Explanation:

In Java, Aggregation is a relationshipthat exists between two classes that is best described as a "has-a"

7 0
4 years ago
Read 2 more answers
Other questions:
  • What following functions does browser perform
    5·1 answer
  • John's Plumbing prides itself on excellent customer service, especially during after-hours service calls. They want to connect w
    11·1 answer
  • When it comes to the best possible security for your wireless router, be sure to use WEP encryption to ensure that your transmis
    14·1 answer
  • you want to enhance your Website visitors' experience. To do this, you need to know the type of browser that each visitor to you
    11·1 answer
  • The Python print function
    9·1 answer
  • Pressing the _____ key when entering title text in a placeholder creates a new paragraph. BACKSPACE SHIFT DELETE ENTER
    5·1 answer
  • true or false then EXPLAIN why. Since many forms of money do not earn interest, people's demand for money is unaffected by chang
    14·2 answers
  • Rewrite the following program segment using a while loop instead of a for loop.
    11·1 answer
  • Which of the following is/are used in multimedia?
    14·1 answer
  • Define a SCHEME function, unzip, which takes a list of pairs ((a .b)... (an .bn)) and returns a pair consisting of the two lists
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!