|
| 1 | +import random |
| 2 | +while 2 == 2: |
| 3 | + print('--------------------------------------------------------------') |
| 4 | + get_again = raw_input('Enter rock paper or scissor : ') |
| 5 | + make_use = random.choice(['rock','paper','scissor']) |
| 6 | + print('--------------------------------------------------------------') |
| 7 | + print(make_use) |
| 8 | + print('--------------------------------------------------------------') |
| 9 | + if get_again == 'rock' and make_use == 'paper': |
| 10 | + print('computer wins! You "LOSE" ') |
| 11 | + print('--------------------------------------------------------------') |
| 12 | + continue |
| 13 | + elif get_again == 'rock' and make_use == 'scissor': |
| 14 | + print('computer loses You win!') |
| 15 | + print('--------------------------------------------------------------') |
| 16 | + break |
| 17 | + elif get_again == 'rock' and make_use == 'rock': |
| 18 | + print('It\'s a tie ! try again !') |
| 19 | + print('--------------------------------------------------------------') |
| 20 | + continue |
| 21 | + elif get_again == 'paper' and make_use == 'paper': |
| 22 | + print('It\'s a tie ! try again !') |
| 23 | + print('--------------------------------------------------------------') |
| 24 | + continue |
| 25 | + elif get_again == 'scissor' and make_use == 'scissor': |
| 26 | + print('It\'s a tie ! try again !') |
| 27 | + print('--------------------------------------------------------------') |
| 28 | + continue |
| 29 | + elif get_again == 'paper' and make_use == 'scissor': |
| 30 | + print('computer wins! You "LOSE" ') |
| 31 | + print('--------------------------------------------------------------') |
| 32 | + continue |
| 33 | + elif get_again == 'scissor' and make_use == 'paper': |
| 34 | + print('computer loses You win!') |
| 35 | + print('--------------------------------------------------------------') |
| 36 | + break |
| 37 | + elif get_again == 'paper' and make_use == 'rock': |
| 38 | + print('computer wins! You "LOSE" ') |
| 39 | + print('--------------------------------------------------------------') |
| 40 | + continue |
| 41 | + elif get_again == 'scissor' and make_use == 'rock': |
| 42 | + print('computer wins You "LOSE" ') |
| 43 | + print('--------------------------------------------------------------') |
| 44 | + continue |
| 45 | + else : |
| 46 | + print('Invalid input: Try again') |
| 47 | + continue |
| 48 | + |
| 49 | + |
0 commit comments