I think something is wrong with this code it won't run. I'm using visual studio code.
When I run it displays:
& C:/Users/user/AppData/Local/Programs/Python/Python310/python.exe "c:/Users/user/New folder/main.py"
import random
isPlaying = True
li = ['rock', 'paper', 'scissors']
while isPlaying == True:
computer_choice = random.choice(li)
player_choice = input('Rock, paper or scissors? Use q to quit.\n').lower()
if player_choice == computer_choice:
print('Tie!')
elif player_choice == 'rock':
if computer_choice == 'scissors':
print(f'You chose {player_choice}, and the computer chose {computer_choice}!')
print('Win!')
elif computer_choice == 'paper':
print(f'You chose {player_choice}, and the computer chose {computer_choice}!')
print('Lose!')
elif player_choice == 'paper':
if computer_choice == 'rock':
print(f'You chose {player_choice}, and the computer chose {computer_choice}!')
print('Win!')
elif computer_choice == 'scissors':
print(f'You chose {player_choice}, and the computer chose {computer_choice}!')
print('Lose!')
elif player_choice == 'scissors':
if computer_choice == 'rock':
print(f'You chose {player_choice}, and the computer chose {computer_choice}!')
print('Lose!')
elif computer_choice == 'paper':
print(f'You chose {player_choice}, and the computer chose {computer_choice}!')
print('Win!')
elif player_choice == 'q':
quit()
else:
print('Invalid choice, use rock, paper or scissors.')
