Giter Site home page Giter Site logo

mavenproject's Introduction

Homework 02

This homework contains three tasks

Task 01

Write a program that calculates the average annual temperature. Also, you need to find months with the lowest and the highest temperature in a year.

Month I II III IV V VI VII VIII IX X XI XII
Temperature -1.7 -1,0 2,6 9,0 15,1 19,4 21,4 21,2 17,1 11,1 5,9 1,4

The example below shows how your output might look:

Average annual temperature: 10.125
Month with the lowest temperature in a year: I
The month with the highest temperatures in a year: VII

Task 02

Write a program that displays a table of temperature correspondence in degrees Celsius and Fahrenheit (F°=9/5·C° + 32). The user should input the temperature range in degrees Celsius and the step.

The example below shows how your output might look. The symbol >>> represents the user input. Notice that it's not the part of the input.

t1 >>> 0
t2 >>> 10
dt >>> 1
-----------------
C       F
-----------------
0.00    32.00
1.00    33.80
2.00    35.60
3.00    37.40
4.00    39.20
5.00    41.00
6.00    42.80
7.00    44.60
8.00    46.40
9.00    48.20
10.00   50.00
-----------------

Task 03

Write a program that determines the minimum of a sequence positive numbers (the length of the sequence is not limited).

The user should input the numbers until enter a zero or negative number.

The example below shows how your output might look. The symbol >>> represents the user input. Notice that it's not the part of the input.

Enter the number after symbol >>>. To exit enter a zero.
>>> 12
>>> 75
>>> 10
>>> 9
>>> 23
>>> 0
Minimum number is 9

mavenproject's People

Watchers

 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.