Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Paper Scissor Rock [Python][Updated!] filter_list
Author
Message
Paper Scissor Rock [Python][Updated!] #1
Code:
from random import choice

choices = ['Paper', 'Scissor', 'Rock']

print('Welcome to Paper-Scissor-Rock Game')

user_name = input('Please enter your good name: ')

print('Welcome', user_name, '!')

print('Pick your choice')

print('''Your Choice:
    1) Paper
    2) Scissor
    3) Rock
    ''')
user_choice = input('Your choice (Type the word): ')

pc_choice = choice(choices)

print(user_choice)

print(pc_choice)

if pc_choice == 'Paper' and user_choice == 'Scissor':
    print('Sissor busts Paper', user_name, 'wins!')

elif pc_choice == 'Scissor' and user_choice == 'Paper':
    print('Scissor busts Paper, PC wins! SHAME ON YOU!')

elif pc_choice == 'Scissor' and user_choice == 'Rock':
    print('Rock beats Scissor', user_name, 'wins!')

elif pc_choice == 'Rock' and user_choice == 'Scissor':
    print('Rock beats Scissor, PC wins!')

elif pc_choice == 'Rock' and user_choice == 'Paper':
    print('Paper beats Rock', user_name, 'wins!')

elif pc_choice == 'Paper' and user_choice == 'Rock':
    print('Rock beats Paper PC wins!')

elif pc_choice == user_choice:
    print('Great Minds think alike ;)')
Code is a little buggy cuz I used the random.choice :wacko:

Here's my updated code, First one was too simple. This time I've added a score system and repeating menu so that you don't have to quit and lauch the app again Smile Have fun!
Code:
import random
from random import choice

user_score = 0
pc_score = 0

usr_choice = ['paper', 'scissor', 'rock']

user_name = input('Please enter your good name: ')

print('Welcome', user_name, '!')

stat = True
while stat:
    print('Welcome to Paper Scissor and Rock Game')

    print('Your Score is: ', user_score)

    print('PC score is: ', pc_score)
    
    print('Choose your pick: Paper, Scissor or Rock')

    usr_pick = input(': ')

    pc_pick = random.choice(usr_choice)

    if pc_pick == 'paper' and usr_pick == 'scissor':
        print('Scissor beats rock', user_name, 'gets the point')
        user_score += 1

    elif pc_pick == 'scissor' and usr_pick == 'paper':
        print('Scissor tears the Paper and PC get the point')
        pc_score += 1

    elif pc_pick == 'scissor' and usr_pick == 'rock':
        print('Rock crushes the Scissor and', user_name, 'takes the point')
        user_score += 1

    elif pc_pick == 'rock' and usr_pick == 'scissor':
        print('Rock destroyes the scissor PC takes the point')
        pc_score += 1

    elif pc_pick == 'rock' and usr_pick == 'paper':
        print('Paper covers the Rock and', user_name, 'takes the point')
        user_score += 1

    elif pc_pick == 'paper' and usr_pick == 'rock':
        print('Paper Dumps the Rock and PC takes the point!')
        pc_score += 1

    elif pc_pick == usr_pick:
        print('Thats a tie, For fun I will deduct points B-) IMA Boss')
        pc_score -= 1
        user_score -= 1
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply

Paper Scissor Rock [Python][Updated!] #2
Code:
from random import choice

choices = ['Paper', 'Scissor', 'Rock']

print('Welcome to Paper-Scissor-Rock Game')

user_name = input('Please enter your good name: ')

print('Welcome', user_name, '!')

print('Pick your choice')

print('''Your Choice:
    1) Paper
    2) Scissor
    3) Rock
    ''')
user_choice = input('Your choice (Type the word): ')

pc_choice = choice(choices)

print(user_choice)

print(pc_choice)

if pc_choice == 'Paper' and user_choice == 'Scissor':
    print('Sissor busts Paper', user_name, 'wins!')

elif pc_choice == 'Scissor' and user_choice == 'Paper':
    print('Scissor busts Paper, PC wins! SHAME ON YOU!')

elif pc_choice == 'Scissor' and user_choice == 'Rock':
    print('Rock beats Scissor', user_name, 'wins!')

elif pc_choice == 'Rock' and user_choice == 'Scissor':
    print('Rock beats Scissor, PC wins!')

elif pc_choice == 'Rock' and user_choice == 'Paper':
    print('Paper beats Rock', user_name, 'wins!')

elif pc_choice == 'Paper' and user_choice == 'Rock':
    print('Rock beats Paper PC wins!')

elif pc_choice == user_choice:
    print('Great Minds think alike ;)')
Code is a little buggy cuz I used the random.choice :wacko:

Here's my updated code, First one was too simple. This time I've added a score system and repeating menu so that you don't have to quit and lauch the app again Smile Have fun!
Code:
import random
from random import choice

user_score = 0
pc_score = 0

usr_choice = ['paper', 'scissor', 'rock']

user_name = input('Please enter your good name: ')

print('Welcome', user_name, '!')

stat = True
while stat:
    print('Welcome to Paper Scissor and Rock Game')

    print('Your Score is: ', user_score)

    print('PC score is: ', pc_score)
    
    print('Choose your pick: Paper, Scissor or Rock')

    usr_pick = input(': ')

    pc_pick = random.choice(usr_choice)

    if pc_pick == 'paper' and usr_pick == 'scissor':
        print('Scissor beats rock', user_name, 'gets the point')
        user_score += 1

    elif pc_pick == 'scissor' and usr_pick == 'paper':
        print('Scissor tears the Paper and PC get the point')
        pc_score += 1

    elif pc_pick == 'scissor' and usr_pick == 'rock':
        print('Rock crushes the Scissor and', user_name, 'takes the point')
        user_score += 1

    elif pc_pick == 'rock' and usr_pick == 'scissor':
        print('Rock destroyes the scissor PC takes the point')
        pc_score += 1

    elif pc_pick == 'rock' and usr_pick == 'paper':
        print('Paper covers the Rock and', user_name, 'takes the point')
        user_score += 1

    elif pc_pick == 'paper' and usr_pick == 'rock':
        print('Paper Dumps the Rock and PC takes the point!')
        pc_score += 1

    elif pc_pick == usr_pick:
        print('Thats a tie, For fun I will deduct points B-) IMA Boss')
        pc_score -= 1
        user_score -= 1
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply

Paper Scissor Rock [Python][Updated!] #3
Code:
from random import choice

choices = ['Paper', 'Scissor', 'Rock']

print('Welcome to Paper-Scissor-Rock Game')

user_name = input('Please enter your good name: ')

print('Welcome', user_name, '!')

print('Pick your choice')

print('''Your Choice:
    1) Paper
    2) Scissor
    3) Rock
    ''')
user_choice = input('Your choice (Type the word): ')

pc_choice = choice(choices)

print(user_choice)

print(pc_choice)

if pc_choice == 'Paper' and user_choice == 'Scissor':
    print('Sissor busts Paper', user_name, 'wins!')

elif pc_choice == 'Scissor' and user_choice == 'Paper':
    print('Scissor busts Paper, PC wins! SHAME ON YOU!')

elif pc_choice == 'Scissor' and user_choice == 'Rock':
    print('Rock beats Scissor', user_name, 'wins!')

elif pc_choice == 'Rock' and user_choice == 'Scissor':
    print('Rock beats Scissor, PC wins!')

elif pc_choice == 'Rock' and user_choice == 'Paper':
    print('Paper beats Rock', user_name, 'wins!')

elif pc_choice == 'Paper' and user_choice == 'Rock':
    print('Rock beats Paper PC wins!')

elif pc_choice == user_choice:
    print('Great Minds think alike ;)')
Code is a little buggy cuz I used the random.choice :wacko:

Here's my updated code, First one was too simple. This time I've added a score system and repeating menu so that you don't have to quit and lauch the app again Smile Have fun!
Code:
import random
from random import choice

user_score = 0
pc_score = 0

usr_choice = ['paper', 'scissor', 'rock']

user_name = input('Please enter your good name: ')

print('Welcome', user_name, '!')

stat = True
while stat:
    print('Welcome to Paper Scissor and Rock Game')

    print('Your Score is: ', user_score)

    print('PC score is: ', pc_score)
    
    print('Choose your pick: Paper, Scissor or Rock')

    usr_pick = input(': ')

    pc_pick = random.choice(usr_choice)

    if pc_pick == 'paper' and usr_pick == 'scissor':
        print('Scissor beats rock', user_name, 'gets the point')
        user_score += 1

    elif pc_pick == 'scissor' and usr_pick == 'paper':
        print('Scissor tears the Paper and PC get the point')
        pc_score += 1

    elif pc_pick == 'scissor' and usr_pick == 'rock':
        print('Rock crushes the Scissor and', user_name, 'takes the point')
        user_score += 1

    elif pc_pick == 'rock' and usr_pick == 'scissor':
        print('Rock destroyes the scissor PC takes the point')
        pc_score += 1

    elif pc_pick == 'rock' and usr_pick == 'paper':
        print('Paper covers the Rock and', user_name, 'takes the point')
        user_score += 1

    elif pc_pick == 'paper' and usr_pick == 'rock':
        print('Paper Dumps the Rock and PC takes the point!')
        pc_score += 1

    elif pc_pick == usr_pick:
        print('Thats a tie, For fun I will deduct points B-) IMA Boss')
        pc_score -= 1
        user_score -= 1
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply







Users browsing this thread: 1 Guest(s)