import random,time
start_time = time.monotonic()
correct = 0
q1 = 'The epoch is the point where the time starts, and is platform dependent. For Unix, the epoch is January 1, 1970, 00:00:00 (UTC). To find out what the epoch is on a given platform, look at time.gmtime(0).'
q2 = 'The functions in this module may not handle dates and times before the epoch or far in the future. The cut-off point in the future is determined by the C library; for 32-bit systems, it is typically in 2038.'
q3 = 'UTC is Coordinated Universal Time (formerly known as Greenwich Mean Time, or GMT). The acronym UTC is not a mistake but a compromise between English and French.'
q4 = 'Function strptime() can parse 2-digit years when given %y format code. When 2-digit years are parsed, they are converted according to the POSIX and ISO C standards: values 69–99 are mapped to 1969–1999, and values 0–68 are mapped to 2000–2068.'
all_answers = q1,q2,q3,q4
for _ in range(4):
print(random.choice(all_answers))
ask = input('T or F? ')
if ask == 'T':
print('Correct!, +1')
correct += 1
else:
print('uncorrectly')
print('Результат = ' + str(correct))
print(f'Тест пройден за {int(time.monotonic() - start_time)} секунд')
Важно , чтобы вопросы шли в рандомном порядке и не повторялись. Но в моём коде вопросы могут повторяться по 2-3 раза, каким образом можно это исправить?