codeschool-projects / HTMLPortfolioProject

Code School Project: HTML + CSS Portfolio
https://codeschool-project-demos.github.io/HTMLPortfolioProject/
MIT License
520 stars 2.62k forks source link

First project game #385

Open Sohil-04 opened 7 months ago

Sohil-04 commented 7 months ago

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 ")