Created
June 11, 2023 13:18
-
-
Save SnowyPainter/30a412398123b433ae8fdae1d331a96c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
sn1 = ['It', 'is', 'a fundraising event', 'which', 'is held', 'on', 'a Friday', 'in March', 'every', 'other', 'year'] | |
sn2 = ['Foodbank', 'also supports', 'food drives', 'for', 'individuals', 'who', 'want', 'to', 'share', 'their', 'food', 'with', 'the', 'poor', 'in the', 'country'] | |
sn3 = ['When', 'I', 'called', "Foodbank's office", 'people', 'there', 'let', 'me', 'know', 'in detail', 'how', 'I', 'could', 'donate', 'food', 'to', 'the', 'hungry'] | |
sn4 = ['These thousands', 'of', 'Santas', 'spread', 'the spirit', 'of', 'Christmas', 'to', 'Australian kids', 'who are', 'sick', 'or', 'disadvantaged'] | |
sn5 = ['He', 'led', 'a', 'mostly', 'unremarkable', 'life', ', working', 'as', 'a', 'Paris customs service officer', 'until', 'his', 'late', 'forties'] | |
sn6 = ['The', 'public', 'and', 'critics', 'laughed at', "Rousseau's", 'flat,', 'seemingly', 'childish', 'style', 'of', 'portraying', 'human', 'figures'] | |
sn7 = ['In', 'this', 'way,', 'he', 'created', 'his', 'own', 'mysterious', 'jungle', 'paintings', 'where', 'reality', 'and', 'fantasy', 'coexist'] | |
sentences = [ | |
"그것은 2년마다 3월의 어느 금요일에 열리는 자선기금 모금 행사야.", | |
"푸드뱅크는 또한 자신의 음식을 나라의 가난한 사람들과 나누고 싶어 하는 개인을 위한 푸드 드라이브도 지원하지.", | |
"내가 푸드뱅크 사무실에 전화를 했을 때, 그곳 사람들은 내가 어떻게 가난한 사람들에게 음식을 기부할 수 있는지 자세하게 알려 주었어.", | |
"이 수천 명의 산타들은 아프거나 빈곤한 오스트레일리아의 어린이들에게 크리스마스 정신을 전파하지.", | |
"그는 40대 후반까지 파리의 세관 공무원으로 일하면서, 대부분 주목 받지 못하는 삶을 살았다.", | |
"대중과 비평가들은 루소의 편평한, 겉보기에는 아이가 인간의 모습을 그린 듯한 스타일을 비웃었다.", | |
"이런 방식으로, 그는 실재와 공상이 공존하는 그만의 신비한 정글 그림들을 만들어 냈다." | |
] | |
answers = [sn1.copy(), sn2.copy(), sn3.copy(), sn4.copy(), sn5.copy(), sn6.copy(), sn7.copy()] | |
random.shuffle(sn1) | |
random.shuffle(sn2) | |
random.shuffle(sn3) | |
random.shuffle(sn4) | |
random.shuffle(sn5) | |
random.shuffle(sn6) | |
random.shuffle(sn7) | |
questions = [sn1, sn2, sn3, sn4, sn5, sn6, sn7] | |
def generate_quiz(): | |
quiz = [] | |
for i, question in enumerate(questions): | |
sentence = sentences[i] | |
quiz.append({ | |
"question": " / ".join(question), | |
"sentence": sentence | |
}) | |
return quiz | |
quiz = generate_quiz() | |
print("문장에 맞게 배열") | |
for i, item in enumerate(quiz): | |
print(f"Question {i + 1}:") | |
print(item["sentence"]) | |
print(item["question"]) | |
a = input("Answer : ") | |
if a != ' '.join(answers[i]): | |
print("Review "+str(i+1)) | |
else: | |
print("Correct.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can I use this function?