J
J
Just Python's sheep2020-07-11 13:07:46
Python
Just Python's sheep, 2020-07-11 13:07:46

How to make it possible to add text and numbers to Label.text?

Badly explained in the title, but not the essence.

I'm doing something like a quiz, and I need it to randomize the numbers and the sign (for example: 13*36). I did it without kivy, it worked.

numq = 1
num1 = randint(1, 99)
num2 = randint(1, 99)
znak = randint(1, 9)
if (znak >= 2 and znak <=5):
  z = "-"
# эта строка принт мне нужна в label.text
        print (numq, "вопрос,", num1, z, num2)
  quest = int(input("Ответ: "))
  numq += 1
        otv = num1 - num2

Only in label.text xs how to do it, I tried it in different ways, it doesn’t work out

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan., 2020-07-11
@LaRN

Here is a similar problem.
https://stackoverflow.com/questions/26656164/how-t...
It uses a StringProperty() proxy object

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question