Skip to content

allienka/python-water-tank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

python-water-tank

The water used to irrigate the fields is stored in a water tank on rainy days. Make a program to add water to the water tank (positive number) and take water out of the tank (negative number). The program ends when the container is empty.

When the user enters a positive number, print "Add water." The tank can hold a maximum of 2,000 liters and if you add more than this, the rest will flow to the ground and the amount of water will remain exactly 2,000 liters.

When the user enters a negative number, print "Let's take water." The total amount of water cannot be less than zero.

Also display the error message "Enter the amount of water as a number!"

In addition, the application should accept not only whole numbers but also decimal numbers. If an attempt is made to take more water than is in the tank, it is reported how much was taken.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages