Git Product home page Git Product logo

saurabh jain's Projects

-equation-solver icon -equation-solver

in this project i have made a equation solver which is basiclly solve all type of polynomial equation and find their intersections . and also draw graph and number line

arithmetic-formatter icon arithmetic-formatter

a function that receives a list of strings that are arithmetic problems and returns the problems arranged vertically and side-by-side. The function should optionally take a second argument. When the second argument is set to `True`, the answers should be displayed.

budget_app_freecodecamp_assignment_project_3 icon budget_app_freecodecamp_assignment_project_3

### Assignment Complete the `Category` class in `budget.py`. It should be able to instantiate objects based on different budget categories like *food*, *clothing*, and *entertainment*. When objects are created, they are passed in the name of the category. The class should have an instance variable called `ledger` that is a list. The class should also contain the following methods: * A `deposit` method that accepts an amount and description. If no description is given, it should default to an empty string. The method should append an object to the ledger list in the form of `{"amount": amount, "description": description}`. * A `withdraw` method that is similar to the `deposit` method, but the amount passed in should be stored in the ledger as a negative number. If there are not enough funds, nothing should be added to the ledger. This method should return `True` if the withdrawal took place, and `False` otherwise. * A `get_balance` method that returns the current balance of the budget category based on the deposits and withdrawals that have occurred. * A `transfer` method that accepts an amount and another budget category as arguments. The method should add a withdrawal with the amount and the description "Transfer to [Destination Budget Category]". The method should then add a deposit to the other budget category with the amount and the description "Transfer from [Source Budget Category]". If there are not enough funds, nothing should be added to either ledgers. This method should return `True` if the transfer took place, and `False` otherwise. * A `check_funds` method that accepts an amount as an argument. It returns `False` if the amount is greater than the balance of the budget category and returns `True` otherwise. This method should be used by both the `withdraw` method and `transfer` method. When the budget object is printed it should display: * A title line of 30 characters where the name of the category is centered in a line of `*` characters. * A list of the items in the ledger. Each line should show the description and amount. The first 23 characters of the description should be displayed, then the amount. The amount should be right aligned, contain two decimal places, and display a maximum of 7 characters. * A line displaying the category total. Here is an example of the output: ``` *************Food************* initial deposit 1000.00 groceries -10.15 restaurant and more foo -15.89 Transfer to Clothing -50.00 Total: 923.96 ``` Besides the `Category` class, create a function (outside of the class) called `create_spend_chart` that takes a list of categories as an argument. It should return a string that is a bar chart. The chart should show the percentage spent in each category passed in to the function. The percentage spent should be calculated only with withdrawals and not with deposits. Down the left side of the chart should be labels 0 - 100. The "bars" in the bar chart should be made out of the "o" character. The height of each bar should be rounded down to the nearest 10. The horizontal line below the bars should go two spaces past the final bar. Each category name should be written vertically below the bar. There should be a title at the top that says "Percentage spent by category". This function will be tested with up to four categories. Look at the example output below very closely and make sure the spacing of the output matches the example exactly. ``` Percentage spent by category 100| 90| 80| 70| 60| o 50| o 40| o 30| o 20| o o 10| o o o 0| o o o ---------- F C A o l u o o t d t o h i n g ``` The unit tests for this project are in `test_module.py`. ### Development Write your code in `budget.py`. For development, you can use `main.py` to test your `Category` class. Click the "run" button and `main.py` will run. ### Testing We imported the tests from `test_module.py` to `main.py` for your convenience. The tests will run automatically whenever you hit the "run" button. ### Submitting Copy your project's URL and submit it to freeCodeCamp.

chatbot-cum-voice-assistant icon chatbot-cum-voice-assistant

An AI chatbot with features like conversation through voice, fetching events from Google calendar, make notes, or searching a query on Google.

currency_image_classifier icon currency_image_classifier

In this project we classify the uro and dollar currency by their values like 20 $ 50$ etc. here we have used two models densnet121 and resnet 18. the highest accuracy achieved is 98.5%

cv icon cv

first html project

desktop-vertual-assistent icon desktop-vertual-assistent

this is a desktop vertual assistance which work on voice command and to daily task like answering the questions open various wesites, open local files and applications

docs icon docs

The open-source repo for docs.github.com

jupyterlab-dash icon jupyterlab-dash

An Extension for the Interactive development of Dash apps in JupyterLab

leetcode-coding-questions icon leetcode-coding-questions

Collection of LeetCode questions to ace the coding interview! - Created using [LeetHub](https://github.com/QasimWani/LeetHub)

polygon-area-calcultor_freecodecamp icon polygon-area-calcultor_freecodecamp

### Assignment In this project you will use object oriented programming to create a Rectangle class and a Square class. The Square class should be a subclass of Rectangle and inherit methods and attributes. #### Rectangle class When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods: * `set_width` * `set_height` * `get_area`: Returns area (`width * height`) * `get_perimeter`: Returns perimeter (`2 * width + 2 * height`) * `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`) * `get_picture`: Returns a string that represents the shape using lines of "\*". The number of lines should be equal to the height and the number of "\*" in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than 50, this should return the string: "Too big for picture.". * `get_amount_inside`: Takes another shape (square or rectangle) as an argument. Returns the number of times the passed in shape could fit inside the shape (with no rotations). For instance, a rectangle with a width of 4 and a height of 8 could fit in two squares with sides of 4. Additionally, if an instance of a Rectangle is represented as a string, it should look like: `Rectangle(width=5, height=10)` #### Square class The Square class should be a subclass of Rectangle. When a Square object is created, a single side length is passed in. The `__init__` method should store the side length in both the `width` and `height` attributes from the Rectangle class. The Square class should be able to access the Rectangle class methods but should also contain a `set_side` method. If an instance of a Square is represented as a string, it should look like: `Square(side=9)` Additionally, the `set_width` and `set_height` methods on the Square class should set both the width and height. #### Usage example ```py rect = shape_calculator.Rectangle(10, 5) print(rect.get_area()) rect.set_height(3) print(rect.get_perimeter()) print(rect) print(rect.get_picture()) sq = shape_calculator.Square(9) print(sq.get_area()) sq.set_side(4) print(sq.get_diagonal()) print(sq) print(sq.get_picture()) rect.set_height(8) rect.set_width(16) print(rect.get_amount_inside(sq)) ``` That code should return: ``` 50 26 Rectangle(width=10, height=3) ********** ********** ********** 81 5.656854249492381 Square(side=4) **** **** **** **** 8 ``` The unit tests for this project are in `test_module.py`. ### Development Write your code in `shape_calculator.py`. For development, you can use `main.py` to test your `shape_calculator()` function. Click the "run" button and `main.py` will run. ### Testing We imported the tests from `test_module.py` to `main.py` for your convenience. The tests will run automatically whenever you hit the "run" button. ### Submitting Copy your project's URL and submit it to freeCodeCamp.

python icon python

this resporatory have ml,ai,nlp,data science etc.python language related material from many websites eg. datacamp,geeksforgeeks,linkedin,youtube,udemy etc. also it include programming challange/competion solutions

refresh-me icon refresh-me

a dice game , whenever refresh a page new dices appear

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.