Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First project game #385

Open
Sohil-04 opened this issue Feb 3, 2024 · 0 comments
Open

First project game #385

Sohil-04 opened this issue Feb 3, 2024 · 0 comments

Comments

@Sohil-04
Copy link

Sohil-04 commented Feb 3, 2024

print('rock,paper, scissor Game*')
#step1
import random
#step 2
item_list=["rock","paper","scissor"]
user_choice=input("choice the one(rock,paper, scissor):")
comp_choice=random.choice(item_list)
print(f"user choice= {user_choice}, computer choice= {comp_choice}")
#step3
if user_choice==comp_choice:
print('match tie')
elif user_choice=='rock':
if comp_choice=='paper':
print("computer win")
else:
print('you win')

elif user_choice== 'paper':
if comp_choice=='rock':
print('you win')
else:
print(" computer win")

elif user_choice=='scissor' :
if comp_choice=='rock':
print('computer win')
else:
print('you win')
else:
print('Provide Valid Info')

print("***** Thanks *****")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant