From 120994f08e8c59bc7b67d2a7088c8154df9cf6c4 Mon Sep 17 00:00:00 2001 From: DEVANSH-GAJJAR Date: Mon, 1 Sep 2025 15:58:15 +0530 Subject: [PATCH 1/4] adding a rock_paper_scissors game --- rock_paper_scissor_game.py | 52 -------------------------------------- rock_paper_scissors.py | 48 +++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 52 deletions(-) delete mode 100644 rock_paper_scissor_game.py create mode 100644 rock_paper_scissors.py diff --git a/rock_paper_scissor_game.py b/rock_paper_scissor_game.py deleted file mode 100644 index 1cc3c8dedd3..00000000000 --- a/rock_paper_scissor_game.py +++ /dev/null @@ -1,52 +0,0 @@ -from __future__ import print_function - -import random - - -# let -# 0 - rock -# 1 - paper -# 2 - scissor - - -def name_to_number(name): - if name == "rock": - name = 0 - elif name == "paper": - name = 1 - elif name == "scissors": - name = 2 - return name - - -def number_to_name(number): - if number == 0: - return "rock" - elif number == 1: - return "paper" - elif number == 2: - return "scissors" - - -def game(player_choice): - print() - name = player_choice - print(name) - number = name_to_number(name) - comp_number = random.randrange(0, 2) - comp_choice = number_to_name(comp_number) - print(comp_choice) - - comp = -int(comp_number) - play = int(number) - diff = (comp + play) % 5 - - if diff == 1 or diff == 3: - print("you won!!!") - elif diff == 0: - print("draw") - elif diff == 2 or diff == 4: - print("you lose!!!") - - -# Also improve it diff --git a/rock_paper_scissors.py b/rock_paper_scissors.py new file mode 100644 index 00000000000..e34264d1cfc --- /dev/null +++ b/rock_paper_scissors.py @@ -0,0 +1,48 @@ +""" +Rock, Paper, Scissors Game +Author: DEVANSH-GAJJAR +""" + +import random + + +def get_user_choice(): + """Prompt the user to enter their choice.""" + choice = input("Enter your choice (rock, paper, scissors): ").lower() + if choice in ["rock", "paper", "scissors"]: + return choice + else: + print("Invalid choice! Please enter rock, paper, or scissors.") + return get_user_choice() + + +def get_computer_choice(): + """Randomly select computer's choice.""" + options = ["rock", "paper", "scissors"] + return random.choice(options) + + +def decide_winner(player, computer): + """Decide the winner based on the choices.""" + if player == computer: + return "It's a draw!" + elif ( + (player == "rock" and computer == "scissors") + or (player == "paper" and computer == "rock") + or (player == "scissors" and computer == "paper") + ): + return "You win!" + else: + return "Computer wins!" + + +def main(): + """Main function to play the game.""" + user_choice = get_user_choice() + computer_choice = get_computer_choice() + print(f"Computer chose: {computer_choice}") + print(decide_winner(user_choice, computer_choice)) + + +if __name__ == "__main__": + main() From 27e1df1ab97b3658851e49ac58c6d2c7e49e0819 Mon Sep 17 00:00:00 2001 From: DEVANSH-GAJJAR Date: Mon, 1 Sep 2025 16:04:20 +0530 Subject: [PATCH 2/4] adding a rock_paper_scissors game --- BrowserHistory/rock_paper_scissors.py | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 BrowserHistory/rock_paper_scissors.py diff --git a/BrowserHistory/rock_paper_scissors.py b/BrowserHistory/rock_paper_scissors.py new file mode 100644 index 00000000000..c6fb00102d6 --- /dev/null +++ b/BrowserHistory/rock_paper_scissors.py @@ -0,0 +1,48 @@ +""" +Rock, Paper, Scissors Game (CLI Version) +Author: Your Name +""" + +import random + + +def get_user_choice(): + """Prompt the user to enter their choice.""" + choice = input("Enter your choice (rock, paper, scissors): ").lower() + if choice in ["rock", "paper", "scissors"]: + return choice + else: + print("Invalid choice! Please enter rock, paper, or scissors.") + return get_user_choice() + + +def get_computer_choice(): + """Randomly select computer's choice.""" + options = ["rock", "paper", "scissors"] + return random.choice(options) + + +def decide_winner(player, computer): + """Decide the winner based on the choices.""" + if player == computer: + return "It's a draw!" + elif ( + (player == "rock" and computer == "scissors") + or (player == "paper" and computer == "rock") + or (player == "scissors" and computer == "paper") + ): + return "You win!" + else: + return "Computer wins!" + + +def main(): + """Main function to play the game.""" + user_choice = get_user_choice() + computer_choice = get_computer_choice() + print(f"Computer chose: {computer_choice}") + print(decide_winner(user_choice, computer_choice)) + + +if __name__ == "__main__": + main() From 3ddcd223c7d07d56f5c49618efb63de5adb2ce89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 11:34:19 +0000 Subject: [PATCH 3/4] Bump requests from 2.32.4 to 2.32.5 Bumps [requests](https://github.com/psf/requests) from 2.32.4 to 2.32.5. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.32.4...v2.32.5) --- updated-dependencies: - dependency-name: requests dependency-version: 2.32.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- ImageDownloader/requirements.txt | 2 +- requirements_with_versions.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ImageDownloader/requirements.txt b/ImageDownloader/requirements.txt index bd6f2345868..727711cf16b 100644 --- a/ImageDownloader/requirements.txt +++ b/ImageDownloader/requirements.txt @@ -1 +1 @@ -requests==2.32.4 +requests==2.32.5 diff --git a/requirements_with_versions.txt b/requirements_with_versions.txt index 653ec6491f4..f21f06ea10a 100644 --- a/requirements_with_versions.txt +++ b/requirements_with_versions.txt @@ -24,7 +24,7 @@ Flask==3.1.1 selenium==4.35.0 firebase-admin==7.1.0 ujson==5.10.0 -requests==2.32.4 +requests==2.32.5 quo==2023.5.1 PyPDF2==3.0.1 pyserial==3.5 From 79f7f92a17db514a345847a4f5e14a60d77360fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 11:40:35 +0000 Subject: [PATCH 4/4] Bump httplib2 from 0.22.0 to 0.30.0 Bumps [httplib2](https://github.com/httplib2/httplib2) from 0.22.0 to 0.30.0. - [Changelog](https://github.com/httplib2/httplib2/blob/master/CHANGELOG) - [Commits](https://github.com/httplib2/httplib2/compare/v0.22.0...v0.30.0) --- updated-dependencies: - dependency-name: httplib2 dependency-version: 0.30.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements_with_versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_with_versions.txt b/requirements_with_versions.txt index 653ec6491f4..b0e7da02f1b 100644 --- a/requirements_with_versions.txt +++ b/requirements_with_versions.txt @@ -104,7 +104,7 @@ slab==1.8.2 psutil==7.0.0 mediapipe==0.10.21 rich==14.1.0 -httplib2==0.22.0 +httplib2==0.30.0 protobuf==6.31.1 colorama==0.4.6 plyer==2.1.0