import random
a = 1
b = 2
c = 3
d = 4
# I would like the random_number to be 5
random_number = random.randint(1,5)
def function():
global random_number
while True:
random_number = random.randint(1,5)
if random_number != a or b or c or d:
break
print (random_number)
function()
down below is the link for the code
So I am trying to make a program that will be able to play tic tac toe. But I have problem with generation of numbers that arent assigned to the variable.This code that I posted keeps giving me random numbers.