LINUX.ORG.RU

История изменений

Исправление gssomi, (текущая версия) :

i = int(input("i -> ")
a = int(input("a -> ")
k = int(input("k -> ")

	bot.send_message(m.chat.id, "afert")
	if not i.isdigit() and not i.isspace():
		bot.send_message(m.chat.id, "before")
		if not a.isdigit() and not a.isspace() and a > i:
			bot.send_message(m.chat.id, "sum")
			if not k.isdigit() and not k.isspace() and 1 < k < a:
				b = []
				while i < a:
					i += 1
					b.append(int(i))
				r = random.sample(b, k)
				bot.send_message(m.chat.id, r)
			else: 
				bot.send_message(m.chat.id, "error, not right k")
		else:
			bot.send_message(m.chat.id, "error, not right a")	
	else: 
		bot.send_message(m.chat.id, "error, not right i")
		



где то в документации увидела. по этому так и вышло. спасибо, исправлю

Исходная версия gssomi, :

i = int(input("i -> ")
	a = int(input("a -> ")
	k = int(input("k -> ")

	bot.send_message(m.chat.id, "afert")
	if not i.isdigit() and not i.isspace():
		bot.send_message(m.chat.id, "before")
		if not a.isdigit() and not a.isspace() and a > i:
			bot.send_message(m.chat.id, "sum")
			if not k.isdigit() and not k.isspace() and 1 < k < a:
				b = []
				while i < a:
					i += 1
					b.append(int(i))
				r = random.sample(b, k)
				bot.send_message(m.chat.id, r)
			else: 
				bot.send_message(m.chat.id, "error, not right k")
		else:
			bot.send_message(m.chat.id, "error, not right a")	
	else: 
		bot.send_message(m.chat.id, "error, not right i")
		



где то в документации увидела. по этому так и вышло. спасибо, исправлю