Untitled

 avatar
unknown
plain_text
2 months ago
2.5 kB
4
Indexable
import json

def create_quiz():
    quiz = {
        "title": "Arabic Language - Test 1 (L 1-4)",
        "questions": [
            {
                "type": "listening_translation",
                "question": "Listen to the following words or sentences and translate them into English:",
                "prompts": ["A", "B", "C", "D", "E"],
            },
            {
                "type": "multiple_choice",
                "question": "Circle the word you hear:",
                "options": [
                    ["لبنان", "طالب"],
                    ["طالب", "باب"],
                    ["دولة", "مدينة"],
                    ["كبير", "بارد"],
                    ["شتاء", "شمال"],
                    ["مصر", "مطر"],
                    ["غرب", "شرق"],
                    ["كندا", "كبير"]
                ]
            },
            {
                "type": "multiple_choice",
                "question": "Circle the letter you hear:",
                "options": [
                    ["ب", "ن"],
                    ["ل", "ن"],
                    ["ت", "د"],
                    ["ط", "د"],
                    ["ف", "ق"],
                    ["غ", "ق"],
                    ["ـع", "ـغ"],
                    ["ج", "ح"]
                ]
            },
            {
                "type": "reading_comprehension",
                "question": "Read the following sentences in Arabic and answer the questions in English:",
                "text": [
                    "البصرة مدينة كبيرة في جنوب العراق. الطقس في البصرة حامي في الصيف.",
                    "مصر شمال السودان وشرق ليبيا."
                ],
                "questions": [
                    "Where is Basra located?",
                    "What is the weather like in Basra in the summer?",
                    "Where is Sudan relative to Egypt?"
                ]
            },
            {
                "type": "word_formation",
                "question": "Connect the letters to form words and give their English equivalents:",
                "words": [
                    "ط ر ا ب ل س",
                    "غ ر ب",
                    "أ س ت ا ذ",
                    "ا ل ص ي ف"
                ]
            }
        ]
    }
    return json.dumps(quiz, ensure_ascii=False, indent=4)

# Generate and print the quiz JSON
test_json = create_quiz()
print(test_json)
Editor is loading...
Leave a Comment