Giter Club home page Giter Club logo

chapter3's Introduction

Chapter3

1. Write a program that converts height from integer inches to feet and inches

2. Write a short program that asks for height in feet and inches and your weight in punds. Have the program report your Body Mass Index (BMI)

3. Write a program that asks for a latitude in degrees, minutes, and seconds and then displays the latitude in a deimal format.

Enter a latitude in degrees, minutes and seconds:
Degrees: 37
Minues: 51
Seconds: 19
37 degrees, 51 minutes, 19 seconds = 37.8553 degrees

4. Write a program that takes seconds as input and displays it in days, hours, minutes and seconds.

Enter the number of seconds: 31600000
31600000 seconds = 365 days, 17 hours, 46 minutes, 40 seconds

5. Write a program that takes the current population of the world and the population of some country and outputs the percent of the world's population lives in that country.

Enter the world's population: 6898758899
Enter the population of your country: 310783781
The population of your country is 4.50492% of the world population.

6. Write a program that takes miles and gallons as input and outputs miles per gallon

7. Write a program that asks for liters per 100 kilometers and converts it to miles per gallon.

Enter how many liters per 100 km:
> 12.4
12.4L/100km is 19.4188 miles per gallon

chapter3's People

Contributors

zlpetersen avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.