Tuesday, October 4
Shadow

rock paper siccor bot vs bot

import random

player1_name = input("what is you're name player 1\n")
player2_name = input("what is you're name player 2\n")
while True:
    mulige_trak = ["rock", "paper", "sciccors"]
    player_1 = random.choice(mulige_trak)
    player_2 = random.choice(mulige_trak)


    print(f"\n{player1_name} chose {player_1}, {player2_name} chose {player_2}.\n ")

    if player_1 == player_2:
        print(f"both players chose {player_1}. its a tie")
    elif player_1 == "rock":
        if player_2 == "sciccors":
            print("rock smashes sciccors! " + player1_name + " wins")
        else:
            print("paper covers rock! " + player2_name + " wins")
    elif player_1 == "paper":
        if player_2 == "rock":
            print("paper covers rock! " + player1_name + " wins")
        else:
            print("sciccors cuts paper! " + player2_name + " win")
    elif player_1 == "sciccors":
        if player_2 == "paper":
            print("sciccors cuts paper! " + player1_name + " wins")
        else:
            print("rock smashes sciccirs")
    play_again = input("play again? (y/n)")
    if play_again.lower() != "y":
        break

Leave a Reply