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
Galina-37 [17]
1 year ago
14

Write a program that converts a decimal height in feet into feet and inches.

Computers and Technology
1 answer:
Naily [24]1 year ago
4 0

The program to illustrate the conversion of the height is illustrated below.

<h3>How to illustrate the program?</h3>

The information here is to convert 1 inch = 2.54 cm. First, we will take user input of height in cm. We first convert this to inches by dividing by 2.54

After that, we use Floor Division // and Modulo % by 12 to get feet and inches respectively.

The inches will be in a lot of decimals. We round this off to 2 decimal places and finally print out the converted height.

The code will be:

# Take user input for height in cm

height_cm = float(input("Enter your height in cm: "))

# Convert height to inches

height_in = height_cm / 2.54

# Get feet by taking floor division with 12

feet = height_in // 12

# Get inches by taking modulo division with 12

inches = height_in % 12

# Round off the inches to 2 decimal places

inches_rounded = format(inches, ".2f")

# Print out the height in feet and inches

print(f"Height is {feet} ft {inches_rounded} in")

Learn more about program on:

brainly.com/question/26134656

#SPJ1

You might be interested in
4. Write technical term for the following statements
IRISSAK [1]

A=Application software

C=Microcomputer

D=hybrid computers

E=digital computer

F=Handheld computer

G=Dextop computer

Sorry,i couldn't help you in B.

5 0
3 years ago
Read 2 more answers
Microsoft word is an example of utility software? <br><br>A.true <br>B.false​
monitta

Answer:

false

Explanation:

Ms word is only an application software

7 0
2 years ago
Read 2 more answers
<img src="https://tex.z-dn.net/?f=%28a%20%2B%20b%29%20%20%7B2%7D" id="TexFormula1" title="(a + b) {2}" alt="(a + b) {2}" align
MariettaO [177]

Answer:

ab2

Explanation:

3 0
2 years ago
Which of the following internet protocols is used to request and send pages and files on the World Wide Web
Marianna [84]

it is . org Explanation:

7 0
2 years ago
Which industry did the Interstate Commerce Act primarily affect? A. coal B. airplane C. steel D. oil E. railroad
babunello [35]

I believe the answer is E. Railroad, hope this helps!

6 0
3 years ago
Read 2 more answers
Other questions:
  • How do you open Microsoft Excel 2013 with Windows 8?
    13·1 answer
  • On an open book test, Anna was asked to predict how American laws may affect the Mexican way of life if the US Constitution was
    15·1 answer
  • Sonora wants to extend the cells to be added in her formula. what is the quickest way to add more sells?
    10·2 answers
  • Professionalism is defined as what?<br> ASAP PLEASE!
    11·1 answer
  • Florida Highway Safety and Motor Vehicles reported blank of traffic fatalities were alcohol-related in Florida in 2009.​
    8·1 answer
  • For each 8-bit data frame the layer uses a generator polynomial G(x) = x4+x2+ x+1 to add redundant bits. What is the sequence of
    11·1 answer
  • The World Wide Web is full of unstructured data. Search engines like Google, Bing and Yahoo have been doing a good job of allowi
    6·1 answer
  • Messages that have been accessed or viewed in the Reading pane are automatically marked in Outlook and the message subject is no
    10·2 answers
  • What model involves the creation of data and process models during the development of an application
    14·1 answer
  • You can merge the cells using the rowspan and colspan attribute of the tag <br> true or false​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!