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
disa [49]
3 years ago
15

Why might a variable used for output have to be of a different type then a variable used for input?​

Computers and Technology
1 answer:
telo118 [61]3 years ago
7 0

Answer:

You may use a different variable type for input in order to process the data appropriately and may use a different variable type to accommodate your program.

Explanation:

Your input may have to be different then output varying on what data you are processing.

For example, just like the last question you asked about calculating the area of the rectangle, your input MUST be converted to a different a numerical data type (i.e int or float) in order to do the math.

Based on your last question, if we didn't convert your input into a string your results wouldn't add the numbers together but only concatenate them. If I typed 3 & 5 as length & width, I would get 35 instead of 15.

Now another example is using functions (or methods whatever you want to call them), your input can be one thing and outputs another.

Let's say I want a function to tell me if I am smart. The way I want it to determine if its smart is by inputting my GPA into it, which is a numerical value. So the function would look something like this:

<u>Code (Python)</u>

def IsSmart(gpa):

  if (gpa >= 4):

       return True

  else

       return False

As you can see I am inputting a numerical value and it is outputting a boolean value. I can use this in a if else chain to spit out an output to the user.

You might be interested in
Explain why there is an overlap of skills and qualities in design professions​
strojnjashka [21]

The design process is the same in all creative occupations, thus, similar skills and qualities are required. The work of an architect, Craftperson, Fine Artist, or an Interior designer is to design. Whether one occupation designs clothing and associated fashions or another one designs interiors of building, they all design. Most people who work as designers possess similar personal qualities like creativity, better communication skills, and high skill set.

6 0
3 years ago
Is there an answer to these picture?
Tomtit [17]

Answer:

yes there is an answer to this question

6 0
3 years ago
What OBD-II term applies when all enabling standards for a specific diagnostic trouble code (DTC) are met?
mash [69]

Answer:

Option C i.e., Trip criteria is correct

Explanation:

The concept Trip criteria are described that when the allowing requirements for its diagnostic code are reached.

In other words, Trip seems to be a key-on method where all the allowing requirements for such a specific diagnostic display are fulfilled as well as the diagnostic monitoring is powered. It is finished once the ignition switch becomes switched off.

  • Option A and Option B are not correct because they are the engines that come under the performance ignition system and they are not related to the following scenario.
  • Option D is incorrect because it is the type of data mining that is not related to the scenario.
3 0
3 years ago
Explain the difference between file and folder (in your own words)
denpristay [2]

Answer:

the difference is one is online and one is not

Explanation:

A file is usually what you find online. And a folder is what you put papers into.

7 0
3 years ago
The most likely reason a firm would decide to establish an extranet would be the desire to Multiple Choice speed the flow of inf
brilliants [131]

Answer: share information and collaborate with a select group of outside organizations or individuals.

Explanation:

When a company uses an intranet, it is for the purpose of sharing information within the company so in the same vein, an extranet is done to share information with entities outside the company be it people or organizations.

For information to be shared, the other companies and organizations need to have the means and authorization to join the extranet. Extranets are very useful as they enable collaboration across vast distances thereby increasing productivity.

6 0
3 years ago
Other questions:
  • Which statements describe molecules
    12·1 answer
  • Explain what might happen if two stations are accidentally assigned the same hardware address?
    15·1 answer
  • If you want to emphasize the Greek root of a word in a document, which tool in Microsoft® Word could you use?
    6·2 answers
  • Answer all 1).The most common layout of keys on the keyboard is the _____ keyboard. ASDF QWERTY JKL QWOPY,
    5·2 answers
  • Write algorithm to find (a+b)^2=(a+b)*(a+b)​
    9·1 answer
  • An adiabatic capillary tube is used in some refrigeration systems to drop the pressure of the refrigerant from the condenser lev
    15·1 answer
  • What term describes what an actor breaks when he addresses the audience directly from stage, like in Hamlet’s “to be or not to b
    13·2 answers
  • The use of Quick Styles is a great way to save
    15·1 answer
  • Write a program called array1.cpp file that use either regular for loop or range based for loop to display the contents of the a
    14·1 answer
  • A vlan ________.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!