buugjuicee8687 buugjuicee8687
  • 13-01-2021
  • Mathematics
contestada

Write a function inches_to_ft that takes a number of inches x and returns the number of feet. One foot equals 12 inches.

Respuesta :

fichoh
fichoh fichoh
  • 16-01-2021

Answer:

def inch_to_feet (x):

return 1/x

Step-by-step explanation:

Implementating the program Using python 3 :

def - - - > function declaration keyword

inch_to_feet - - > function name

x - - > argument which the function takes

The value returned is a conversion of x which is in inches to feets

1/12 feet = 1 inch

To see the value returned ;

We can run the code :

def inch_to_feet(x):

return (1/12)*x

b = inch_to_feet(12)

print(b)

The code above will print 1.

Answer Link

Otras preguntas

The variables x and y are inversely proportional, and y=2 when x=3. What is the value of y when x=9?
How deep can we go into Earth's interior?
What does U = Please help
A car advertisement states that a certain car can accelerate from rest to 70km/h in 7 seconds. Find the car’s acceleration in m/s.
WHAT SEPARATES JAPAN AND THE MAINLAND OF ASIA ?
A student rounded the size of a park to the nearest thousand acres. Her estimate was 276,000 acres. What number could be the exact number of acres? A 276,543
What does Y = to please help
Which religion in India combines the Muslim belief in one God with the Hindu belief in reincarnation?
Waves A and B have the same speed, but wave A has a shorter wavelength. Which wave has the higher frequency?
Can some one help me with this??? Really need help