question = cursor.execute('SELECT question FROM questions').fetchall()
answer = cursor.execute('SELECT answer FROM questions').fetchall()
wrong1 = cursor.execute('SELECT wrong1 FROM questions').fetchall()
wrong2 = cursor.execute('SELECT wrong2 FROM questions').fetchall()
wrong3 = cursor.execute('SELECT wrong3 FROM questions').fetchall()
while i < 16 and wrong_answer == 0:
keyboard1 = types.ReplyKeyboardMarkup(row_width=1, resize_keyboard=True)
button_answer = types.KeyboardButton(text=SQLighter.answer[i])
button_wrong1 = types.KeyboardButton(text=SQLighter.wrong1[i])
button_wrong2 = types.KeyboardButton(text=SQLighter.wrong2[i])
button_wrong3 = types.KeyboardButton(text=SQLighter.wrong3[i])
keyboard1.add(button_answer, button_wrong1, button_wrong3, button_wrong2)
bot.send_message(message.chat.id, SQLighter.question[i], reply_markup=keyboard)
if message.text == SQLighter.answer[i]:
bot.send_message(message.chat.id, "Good")
else:
bot.send_message(message.chat.id, "Bad")
wrong_answer += 1
i += 1