Answer the question
In order to leave comments, you need to log in
How to bind random to qr code in python?
users = surname + " " + name + "/" + grade + "/" + day + "/" + number
img = qrcode.make(users)
img.save('qr_code.png')
bot.send_photo(call. message.chat.id, open('qr_code.png', 'rb'))
# should be a random number instead of number
Answer the question
In order to leave comments, you need to log in
1. Forget about the bot.
2. Learn the basics of python. Specifically on the topic of the question:
- What are variables;
- What type are there;
- Basic operations with variables;
- The random module and its methods;
3. Return to the bot and solve this elementary task.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question