GithubHelp home page GithubHelp logo

test_task_1_5's Introduction

Test task

1.5 Функция input()

Напишите программу, которая вычисляет длину отрезка (т.е. расстояние между двумя точками), заданного двумя значениями x1 и x2 (вещественные числа).

Run program

$ python3 task.py
Type in `x` value, please: 3.14159
Type in `y` value, please: -3.14159
The length between `x` and `y` is 6.28318

Tests

Requirements

pip3 install -r requirements.txt

Run tests


=============================================================================================================== test session starts =========================================================================
platform linux -- Python 3.8.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- ~/.venv/bin/python3
cachedir: .pytest_cache
rootdir: ./test_task_1_5
plugins: requests-mock-1.9.3, mock-3.6.1, repeat-0.9.1
collected 3 items                                                                                                                                                                                            

test_task.py::test_read_input_float_invalid PASSED                                                                                                                                                      
test_task.py::test_read_input_float_valid PASSED
test_task.py::test_calculate PASSED

================================================================================================================ 3 passed in 0.04s ==========================================================================

test_task_1_5's People

Contributors

imortkz avatar

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.