L
L
lolchik2020-04-15 10:33:34
Python
lolchik, 2020-04-15 10:33:34

How to correlate answers and questions?

from random import *
#коды
s1 = "c3c4v"
s2 = "67bz8"
s3 = "l67n4"
s4 = "w7a9s"
s5 = "9g8f7"
#ответы
s1a = "323322"
s2a = "562267"
s3a = "1256144"
s4a = "2361819"
s5a = "8g7f6"
block.c1 = random.choices(s1,s2,s3,s4,s5)
block.c2 = random.choices(s1,s2,s3,s4,s5)
block.c3 = random.choices(s1,s2,s3,s4,s5)
block.c4 = random.choices(s1,s2,s3,s4,s5)
block.c5 = random.choices(s1,s2,s3,s4,s5)
print("code:" + block + block + block + block + block)
ans = input("enter decryption")

you need to make a code that will correlate the entire answer with the correct answer for each block

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-04-15
@lo1chik

dict = {
    "c3c4v": "323322",
    "67bz8": "562267",
    "l67n4": "1256144",
    "w7a9s": "2361819",
    "9g8f7": "8g7f6",
}

block.c1 = random.choices(dict.keys())
block.c2 = random.choices(dict.keys())
block.c3 = random.choices(dict.keys())
block.c4 = random.choices(dict.keys())
block.c5 = random.choices(dict.keys())

print("code:" + block + block + block + block + block)
ans = input("enter decryption")

Get value:
dict['c3c4v'] - will return 323322

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question