At Westonci.ca, we connect you with experts who provide detailed answers to your most pressing questions. Start exploring now! Get detailed answers to your questions from a community of experts dedicated to providing accurate information. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts.
Sagot :
import random
computer_choice = random.choice(["rock", "paper", "scissors"])
user_choice = input("rock, paper, or scissors? ")
if computer_choice == user_choice:
print("It's a draw!")
elif user_choice == "rock" and computer_choice == "scissors":
print("You win!")
elif user_choice == "paper" and computer_choice == "rock":
print("You win!")
elif user_choice == "scissors" and computer_choice == "paper":
print("You win!")
else:
print("The computer wins!")
I wrote my code in python 3.8. I hope this helps.
We appreciate your visit. Our platform is always here to offer accurate and reliable answers. Return anytime. Your visit means a lot to us. Don't hesitate to return for more reliable answers to any questions you may have. Get the answers you need at Westonci.ca. Stay informed by returning for our latest expert advice.