Giter Club home page Giter Club logo

bull.py's Introduction

bull.py

PROBLEM STATEMENT

Chef is on his way to become the new big bull of the stock market but is a bit weak at calculating whether he made a profit or a loss on his deal.

Given that Chef bought the stock at value X and sold it at value Y. Help him calculate whether he made a profit, loss, or was it a neutral deal.

Input Format

The first line of input will contain a single integer T, denoting the number of test cases. Each test case consists of a single line of input containing two space-separated integers X and Y, denoting the value at which Chef bought and sold the stock respectively.

Output Format

For each test case, output PROFIT if Chef made a profit on the deal, LOSS if Chef incurred a loss on the deal, and NEUTRAL otherwise.

The checker is case-insensitive so answers like pROfiT, profit, and PROFIT would be considered the same.

Constraints

1<=T<=500
1<=X,Y<=100

Sample 1:

Input Output

4 2 LOSS 8 8 NEUTRAL 3 4 PROFIT 2 1 LOSS

Explanation:

Test case 1 1: Since the cost price is greater than the selling price, Chef made a loss in the deal.

Test case 2 2: Since the cost price is equal to the selling price, the deal was neutral.

Test case 3 3: Since the cost price is less than the selling price, Chef made a profit in the deal.

Test case 4 4: Since the cost price is greater than the selling price, Chef made a loss in the deal.

bull.py's People

Contributors

deepikaa2004 avatar

Stargazers

 avatar  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.