Добавить в корзинуПозвонить
Найти в Дзене

⚪️Шпаргалки для русского

⚪️Шпаргалки для русского from itertools import permutations from random import * def num(x): otv = 0 A = (2 <= x <=4) or (9 <= x <= 12 ) or (x == 16) or (22 <= x <=23 ) # Обычные задания if A == True: rnd = randint(2, 4) return choice([''.join(x) for x in (permutations("12345", r=rnd))]) B = x == 8 or x == 22 #8, 22 if B == True: return choice([''.join(x) for x in (permutations("123456789",r=5))]) C = x == 15 or (17 <= x<= 20) or x == 21 #задание 1 или все if C == True: vvod = int(input("Введите количество максимальных ответов")) per = str([''.join(x) for x in range(1,vvod+1)]) rnd = randint(1, vvod) return choice([''.join(x) for x in (permutations(per, r=rnd))]) S = x == 1 or (5<=x<=7) or (13<= x <= 14) or x == 24 # Текстовое if S == True: return "Здесь только молиться" return "Ошибка" print("Генератор ответов на ваш вариант Русского языка") variant = input("Ваш вариант: ") while True: zadanie = int(input("Введите номер задания ")) print(num(zadanie)) prov = input("Проверить еще?

⚪️Шпаргалки для русского

from itertools import permutations

from random import *

def num(x):

otv = 0

A = (2 <= x <=4) or (9 <= x <= 12 ) or (x == 16) or (22 <= x <=23 ) # Обычные задания

if A == True:

rnd = randint(2, 4)

return choice([''.join(x) for x in (permutations("12345", r=rnd))])

B = x == 8 or x == 22 #8, 22

if B == True:

return choice([''.join(x) for x in (permutations("123456789",r=5))])

C = x == 15 or (17 <= x<= 20) or x == 21 #задание 1 или все

if C == True:

vvod = int(input("Введите количество максимальных ответов"))

per = str([''.join(x) for x in range(1,vvod+1)])

rnd = randint(1, vvod)

return choice([''.join(x) for x in (permutations(per, r=rnd))])

S = x == 1 or (5<=x<=7) or (13<= x <= 14) or x == 24 # Текстовое

if S == True:

return "Здесь только молиться"

return "Ошибка"

print("Генератор ответов на ваш вариант Русского языка")

variant = input("Ваш вариант: ")

while True:

zadanie = int(input("Введите номер задания "))

print(num(zadanie))

prov = input("Проверить еще? ").lower()

if prov.count("не") >= 1:

exit()