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
GenaCL600 [577]
3 years ago
15

One foot equals 12 inches. Write a function named feet_to_inches that accepts a number of feet as an argument and returns the nu

mber of inches in that many feet. Use the function in a program that prompts the user to enter a number of feet and then displays the number of inches in that many feet.
Computers and Technology
1 answer:
fenix001 [56]3 years ago
8 0

Answer:

def feet_to_inches( feet ):

      inches = feet * 12

      print(inches, "inches")

feet_to_inches(10)

Explanation:

The code is written in python.  The unit for conversion base on your question is that 1 ft = 12 inches. Therefore,

def feet_to_inches( feet ):

This code we define a function and pass the argument as feet which is the length in ft that is required when we call the function.

inches = feet * 12

Here the length in ft is been converted to inches by multiplying by 12.

print(inches, "inches")

Here we print the value in inches .

feet_to_inches(10)

Here we call the function and pass the argument in feet to be converted  

       

You might be interested in
Can I have help on this
never [62]

the answer is the seconf one


6 0
3 years ago
Read 2 more answers
Declare a character variable letterStart. Write a statement to read a letter from the user into letterStart, followed by stateme
oee [108]
  1. Answer: import java.util.Scanner; public class CharTestt {     public static void main(String[] args) {     System.out.println("Please enter a character ");     Scanner input = new Scanner(System.in);     char letterStart = input.next().charAt(0);     char thenextChar = (char)(letterStart+1);     System.out.print(letterStart);     System.out.println(thenextChar); } } Explanation: Import Scanner Class Prompt user to enter a character Read and save user's input in a variable char letterStart = input.next().charAt(0); Knowing that the next character using ASCII is +1, create a new character variable and add 1 print the character entered and the new character all on same line without spaces
5 0
3 years ago
What would happen if computers only had input peripherals and a CPU?
lisov135 [29]
Then there would be no way to see the output based off what you input. =)
3 0
2 years ago
Which of the following option is not available in Insert>>Picture?
zysi [14]

Answer:

Word art

Explanation:

its copy and paste

7 0
3 years ago
Read 2 more answers
Setting financial priorities and goals will help you save money for future needs <br> True or false?
allsm [11]
Hey there!

Here is your answer:

<u><em>The proper answer to this question is option A "true".</em></u>

Reason:

<u><em>Financial priorities, and goals would help make a person more money. Goals would include: Opening bank accounts, adding money to some sort of fund, or putting money into a bank account.</em></u>

<em>Therefore the answer is option A!</em>

If you need anymore help feel free to ask me!

Hope this helps!

~Nonportrit 
3 0
3 years ago
Other questions:
  • Web pages with personal or biograpic information are called ​
    10·1 answer
  • Playstation 4 how to change mtu settings
    12·1 answer
  • Using e-mail has decreased the number of hand-written letters that people send to their friends and relatives. this is a ____ fu
    11·1 answer
  • Write a function that will alphabetize a string WITHOUT using the sort function :
    7·1 answer
  • Which of the following statements is not true? Group of answer choices
    9·1 answer
  • The computer program that Josh is working on presents him with a sentence in which a word has been underlined. Josh has to indic
    9·1 answer
  • Pda bkhhksejc pnwjoynelp dwo xaaj ajykzaz ywj ukq zaykza ep???<br><br><br> The Key Value is 22
    12·1 answer
  • Which of the following is a hand-drawn animation that takes a large amount of time to complete?
    5·1 answer
  • Which of the following statements is/are correct? a. At the network layer, entitlement can map identity and/or attributes to fun
    8·1 answer
  • A for construct is a loop construct that processes a specified list of objects. As a result, it is executed as long as there are
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!