Hey there, so I recently joined an online course, and the first mini-project is to create rock, paper, scissors, lizard, spock.
upon testing my program it seems I've got an error in my code and I can't for the life of me figure it out, I was hoping you guys could help me fix it.
I get this error unsupported operand type(s) for Sub: 'number' and 'NoneType'
for this line
victor = (c_num - p_num) % 5
The issue seems to be with p_num, but I can't figure it out, if it helps, here is all the stuff to do with p_num
p_num = name_to_number(guess)
if guess == "rock": p_num = 0 elif guess == "spock": p_num = 1 elif guess == "paper": p_num = 2 elif guess == "lizard": p_num = 3 elif guess == "scissors": p_num = 4`