I want to make a number quiz on Python, but I don't know what to doHelp me

Asked 2 years ago, Updated 2 years ago, 17 views

I am a middle school student studying abroad I'm not good at English yet because I just came here. Recently, I've been interested in programming, so I'm learning programming, but it's too hard Last week, I received a task to make a quiz with two functions into Python, but I'm so at a loss.
First of all, the Korean pronunciation of numbers? We're going to give a quiz and guess the answer.
When I enter the program, I ask if I want to study mode or test mode, and if I choose study mode, I will show the pronunciation and numbers from 1 to 10.

• 1 day (IL)
• 2 (e)
• Three (sahm)
• Four (sah)
• 5 Oh (oh)
• 6 (yooh)
• Seven (Chil)
• 8 arms (Pahl)
• 9th District (Goo)
• 10 (Shib)

After showing it like this, you ask if you are going to study or test again, and if you say you are going to test, you ask what level of test you will take, and then you choose between levels 1 and 2.
At level 1, I want to print out the pronunciation of the numbers randomly and make it into a form in which the Flayer enters the numbers and answers the questions. Then ask if you want to take another level test again, and then let them choose between levels 1 and 2. If I select level 2, I want to display numbers and input pronunciation. Help me

import random 

numbers = [["Il", 1],["Yee", 2],["Sahm", 3],["Sah", 4],["Oh" ,5],["Yough", 6],["Chil", 7],["Pahl", 8],["Goo", 9],["Shib", 10]]

random.shuffle(numbers)

for i in numbers:
    answer = int(input("What is {}: ".format (i[0])))
    if answer == i[1]:
        print("+++++ CORRECT +++++")
    else:
        print("XXXXX INCORRECT XXXXX")

That's all I can make ㅠ<

python

2022-09-22 19:35

1 Answers

I can't tell you everything because it's homework. I think we need to start with what a function (or "method") does in the first place. I think the minimum function we need to make now is two.

So one test is defined in this order.

So what we call "studying" is we're going to do 10 tests until we run out of questions.

Actually, I have a lot of other things to do and think about. First, think about the contents of the functions below. When you have something you don't know, you can stop crying and study. You can do it.

def give_a_question(level) :
    # Blah blah blah...
    # Return: Level-Question-Answer List

def take_an_answer(level, question, answer) :
    # This and that...
    # Return: True or False


2022-09-22 19:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.