Open Sohil-04 opened 7 months ago
print('*rock,paper, scissor Game**')
import random
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}")
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 ")
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 ")