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
ira [324]
3 years ago
11

When you pass an argument to a method, the argument's data type must be ____________ with the receiving parameter's data type?

Computers and Technology
1 answer:
Sedbober [7]3 years ago
6 0
Any time you pass an argument to a method, the data type arguments must be assignment compatible with data type receiving parameter.
<span />
You might be interested in
3.14 LAB: Simple statistics for Python
Ad libitum [116K]

Answer:

Following are the correct python code to this question:

n1 = float(input('Input first number: '))#input first number  

n2 = float(input('Input second number: '))#input second number  

n3 = float(input('Input third number: '))#input third number  

n4 = float(input('Input fourth number: '))#input fourth number  

average = (n1+n2+n3+n4)/4 #calculate input number average

product = n1*n2*n3*n4 # calculate input number product

print('product: {:.0f}  average: {:.0f}'.format(round(product),round(average))) #print product and average using round function

print('product: {:.3f}  average: {:.3f}'.format(product,average)) #print product and average value

Output:

Please find the attachment.

Explanation:

The description of the above python code can be defined as follows:

  • In the above python program four variable "n1, n2, n3, and n4" is defined, in which we take input from the user end, and in these user inputs we use the float method, that converts all the input value in to float value.
  • In the next step, two variable average and product are defined, that calculate all input numbers product, average, and hold value in its variable.
  • In the last line, the print method is used, which prints its variable value by using a round and format method.

8 0
3 years ago
Ross has to create a presentation for his class but can't decide on a topic. What should he do?
mylen [45]
Resheach thngs that instrest him and that fit the guidlines
6 0
3 years ago
Read 2 more answers
Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per l
alexandr1967 [171]

Answer:

a=input("Amount in pennies")

b=int(a)

dollars=0

dimes= 0

quarters=0

nickels=0

pennies = 0

dollars = int(b/100)

b= b- dollars *100

quarters=int(b/25)

b=b-quarters*25

dimes = int(b/10)

b = b -dimes*10

nickels=int(b/5)

b=b - nickels * 5

pennies = b

print(dollars)

print(dimes)

print(nickels)

print(pennies)

Explanation:

The required program is in answer section. Note, the amount is entered in pennies.

7 0
3 years ago
Write a function DrivingCost() with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar
posledela

Answer:

#include <iostream>

using namespace std;

double DrivingCost(int drivenMiles,double milesPerGallon,double dollarsPerGallon)

{

   double dollarsperMile=dollarsPerGallon/milesPerGallon;//calculating dollarsperMile.

   return dollarsperMile*drivenMiles;//returning thr driving cost..

}

int main() {

double ans;

int miles;

cout<<"Enter miles"<<endl;

cin>>miles;

ans=DrivingCost(miles,20.0,3.1599);

cout<<ans<<endl;

return 0;

}

Output:-

Enter miles

10

1.57995

Enter miles

50

7.89975

Enter miles

100

15.7995

Explanation:

In the function first I have calculated the dollars per mile and after that I have returned the product of dollarspermile and driven miles.This will give the cost of the Driving.

4 0
2 years ago
With the help of technology students will benefit greatly from studying by themselves at home. Do you agree or disagree with the
cestrela7 [59]
I disagree because when kids are home alone, and you think they are studying they might not be and they will be playing games on the computer.
6 0
3 years ago
Read 2 more answers
Other questions:
  • Question 14. (3.04 MC) how does the project manager evaluate the scope of a project
    14·1 answer
  • What is an individual section machine?
    14·1 answer
  • What is the difference between a Is your Milling machine and grinding machine
    6·1 answer
  • What are frames in anamation
    11·2 answers
  • Which search engine does not track users? Choose the answer.
    10·2 answers
  • Write a program to Test if mold is stored in the variable word.
    5·1 answer
  • What the central difference between negative and positive politeness?
    13·2 answers
  • given the variables temperature and humidity, write an expression that evaluates to true if and only if the temperature is great
    11·1 answer
  • When James added a date field to a PivotTable, Excel grouped the date values into quarters, months, and years. He does not want
    13·1 answer
  • The process of getting listing information displayed on numerous other websites is:________
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!