mryashaditya007 / hacktoberfest2023 Goto Github PK
View Code? Open in Web Editor NEWOpportunity to start open source and PR experience
License: MIT License
Opportunity to start open source and PR experience
License: MIT License
I want to add Hangman Game. Please assign it to me.
Path - Problems/ShoppingCart.java
Issue Description:
The calculateTotalPrice function in the ShoppingCart.java file is throwing a NullPointerException when an item in the shopping cart has a null price. This issue needs to be resolved to ensure the correct calculation of the total price.
Steps to Reproduce:
Execute the calculateTotalPrice function in Java with a shopping cart containing an item with a null price.
Expected Behavior:
The function should handle items with null prices gracefully and calculate the total price correctly.
Actual Behavior:
The function throws a NullPointerException when encountering an item with a null price, causing the calculation to fail.
Proposed Solution:
To resolve this issue, we need to modify the calculateTotalPrice function in the ShoppingCart.java file to check for null prices before adding them to the total. If an item has a null price, it should be skipped in the calculation.
This modification ensures that items with null prices are excluded from the calculation, preventing the NullPointerException.
Additional Information:
Relevant code file: ShoppingCart.java
Environment: Java 8, ShoppingCart version 1.2.3
Labels: bug, NullPointerException
I have created calculator in cpp please give me the role so that I can merge into your Repo
Don't forget to add your user name and profile URL link in README.md
Add to python directory
don't forget to add your user name and profile URL link in README.md
Want to contribute a project that analyse the market basket.
Fast Modular Exponentiation is a high-performance technique used in computer science and cryptography to swiftly compute massive modular exponentiations. It is especially handy when working with big numbers since it decreases the amount of multiplications and intermediate results required to perform the modular exponentiation.
Add Python file or Jupyter Notebook file
Path
I want to add N-Queens Problem solution in LeetCode, using backtracking approach.
Rock-paper-scissors is a hand-based game between two players, in which each player simultaneously forms one of three shapes with an outstretched hand. These shapes are "rock" (a closed fist), "paper" (a flat hand), and "scissors" (a fist with the index and middle fingers extended).
The game has only three possible outcomes:
Rock beats scissors (rock crushes scissors)
Scissors beats paper (scissors cuts paper)
Paper beats rock (paper covers rock)
If both players choose the same shape, the game is a tie.
The game is often played as a best-of-three series, but it can also be played as a single round.
Rock-paper-scissors is a simple game, but it is also a lot of fun. It is a great game to play with friends and family, and it can be enjoyed by people of all ages.
Sources
en.wikipedia.org/wiki/Rock_paper_scissors
apkpure.com/rps-rock-paper-scissors/com.kixes.rps
profile picture
make the intro of the game such that I making that game in python language
View other drafts
Sure, here is a more intro of the game explaining how I'm making it in Python:
I'm making a rock-paper-scissors game in Python. This is a classic two-player game where each player chooses one of three shapes: rock, paper, or scissors. The winner is determined by the following rules:
Rock beats scissors
Scissors beats paper
Paper beats rock
If both players choose the same shape, the game is a tie.
I'm using Python to make this game because it is a popular and versatile language. It is also relatively easy to learn, making it a good choice for beginners.
To make the game, I'll start by importing the random module. This module allows us to generate random numbers, which we'll need to use to determine the computer's choice.
Next, I'll create a function to generate a random choice for the computer. This function will simply return one of the three shapes at random.
Then, I'll create a function to get the player's choice. This function will prompt the player to enter their choice and then return it.
Finally, I'll create a function to determine the winner of the game. This function will take the player's choice and the computer's choice as input and then return the winner.
Once I have all of these functions written, I can put them together to make the game. The game loop will simply prompt the player to enter their choice, generate the computer's choice, and then determine the winner. The game will continue until one player wins three rounds.
Your review and insights are vital as we enhance the repository's utility.
Happy coding :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.