Я написал простой код на python, и я хочу сделать для него графический интерфейс, и я хочу использовать pyqt5.
Как я могу превратить мой код в графический интерфейс, используя pyqt5?
понятия не имел как и с чего начать ...
Есть ли хороший источник для изучения Pyqt5 с нуля бесплатно?
это мой код кстати:
случайный импорт
def restart ():
return GuessingGame ()
def GuessingGame ():
числа = случайный пример (диапазон (9), 5)
print("instruction:")
print("Correct = C, Wrong= W, Missplaced = M")
print("there are no repeative digits.")
lst=[0,0,0,0,0,0,0,0,0]
while (lst[0] != numbers[0] or lst[1] != numbers[1] or lst[2] != numbers[2] or lst[3] != numbers[3] or lst[4] != numbers[4]):
g = int(input("Guess the five digit number:"))
lst = [int(y) for y in str(g)]
showcase = str()
if (lst[0] == numbers[1] or lst[0] == numbers[2] or lst[0] == numbers[3] or lst[0] == numbers[4]):
showcase= showcase + str("M,")
elif (lst[0] != numbers[0] and lst[0] != numbers[1] and lst[0] != numbers[2] and lst[0] != numbers[3] and lst[0] != numbers[4]):
showcase = showcase + str("W,")
else:
showcase = showcase + str("C,")
if (lst[1] == numbers[0] or lst[1] == numbers[2] or lst[1] == numbers[3] or lst[1] == numbers[4]):
showcase = showcase + str("M,")
elif (lst[1] != numbers[0] and lst[1] != numbers[1] and lst[1] != numbers[2] and lst[1] != numbers[3] and lst[1] != numbers[4]):
showcase = showcase + str("W,")
else:
showcase = showcase + str("C,")
if (lst[2] == numbers[0] or lst[2] == numbers[1] or lst[2] == numbers[3] or lst[2] == numbers[4]):
showcase = showcase + str("M,")
elif (lst[2] != numbers[0] and lst[2] != numbers[1] and lst[2] != numbers[2] and lst[2] != numbers[3] and lst[2] != numbers[4]):
showcase = showcase + str("W,")
else:
showcase = showcase + str("C,")
if (lst[3] == numbers[0] or lst[3] == numbers[1] or lst[3] == numbers[2] or lst[3] == numbers[4]):
showcase = showcase + str("M,")
elif (lst[3] != numbers[0] and lst[3] != numbers[1] and lst[3] != numbers[2] and lst[3] != numbers[3] and lst[3] != numbers[4]):
showcase = showcase + str("W,")
else:showcase = showcase + str("C,")
if lst[4] == numbers[0] or lst[4] == numbers[1] or lst[4] == numbers[2] or lst[4] == numbers[3]:
showcase = showcase + str("M,")
elif (lst[4] != numbers[0] and lst[4] != numbers[1] and lst[4] != numbers[2] and lst[4] != numbers[3] and lst[4] != numbers[4]):
showcase = showcase + str("W,")
else:
showcase = showcase + str("C,")
print("Status is:(",showcase,")")
if (lst[0] == numbers[0] and lst[1] == numbers[1] and lst[2] == numbers[2] and lst[3] == numbers[3] and lst[4] == numbers[4]):
print("Winner Winner chiken dinner")
GuessingGame ()