Python Homework help needed, not to challenging!?

Need help with my programming homework, This is what it states..

Write a program that will allow a student to enter their name and then ask them to solve mathematical equations. The program should display two random numbers that are to be added, such as:


The program should allow the student to enter the answer. The program should then display whether the answer was right or wrong, and accumulate the correct values. After the questions are asked, calculate the average correct. Then display the student name, the number correct, and the average correct in both decimal and percentage format.

I have created a flow chart and need help creating this code.

all i have right now is


studentName =

numQuestions =

operatorList = (“+”,”-“,”*”)

#Main Variable

def main()

print (‘Welcome to the question mathmatical test’)

studentName = (input(‘What is your name?:’))

def testQuestions()

✅ Answers

? Favorite Answer

  • You need to do some revision on what is a variable and what is a function. The three variables you listed first under the #Variables comment are variables, but the under the #Main Variable comment you have a function.

    The sprogram specification only mentioned addition so you should get rid of the operatorList variable entirely. You could also get rid of studentName and numQuestions but it’s no big deal.

    First off it’s obvious that you’re going to need a loop because the program has to do something times. We can draw it up a little neater so that it’s easier to see how it can become code. Lets rewrite the specification like this.

    See also  Task Manager Gone followed by Regedit has been disabled (Windows Home Premium)?

    . get the users name

    . display random numbers that are to be added

    . get an answer from the user

    . if the answer is correct, tell them so

        otherwise if it’s wrong, tell them that

    . reapet from step until ten questions have been done

    . display the correct answer percentage as percentage

        and as a decimal fraction

        and the total number of correct answers

    It’s pretty straight forward to write something like that up and it doesn’t have to conform to some language but already by doing that you’ve just written an algorithm which is what a program is. It’s also now easy to notice the loop from step to and also the if else branch at step .

    I’ll try and start you off a little but not too much.

    print(“Welcome to the question mathmatical test”)

    studentName = input(“whats you’r name?: “) # this is step


    ✅ Answers


    numQuestions =

    while numQuestions < : # this line is actually step btw

        ### fill in step ###

        ### fill in step ###

        if studentAnswer == actualAnswer:

            ### fill in step (first case) ###


    ✅ Answers



            ### fill in step (second case) ###

        numQuestions +=

    ### (fill in step ) ###

    step should be the most difficult for you.

  • For a first time snake owner kingsnakes, cornsnakes, and milksnakes all make good pets. A lot of pet shops will tell you that ball pythons make good first time snakes but they really don’t…ball pythons take specific humidity requirements and ball pythons can go on really long hunger strikes (like for a year) which by the end of it both snake and owner are stressed out. Kings, corns, and milks can tolerate handling and don’t need a whole lot of humidity. And they are usually docile snakes. Small is relative with snakes (it all depends on what you think of as small for a snake). Ball pythons stay small (usually ‘ or less) but they are kind of thick. Corn snakes can get up to ‘ but they stay really skinny Good luck!

    See also  Is there anyone who understands Use Case Diagrams in Java?
  • Other Related Questions

    Learning Visual Basic ?

    Answers Favorite AnswerTry using "System.Diagnostics.Process. GetProcessesByName( "iwmp" ).Length > " for your check.

    Microsoft Office word Fast answer needed its urgent?

    Answers Favorite AnswerTry this: is another thread re: the same issue with instructions:

    Can I download a whole city android google maps?

    Answers Favorite Answer:) Yes!!!Interesting question. I wonder why it has blocked in this way especially considering that Google Earth is very detailed and has good maps of Israel.

    What is meant by ROM ? Explain in simple but elaborate terms.What about mobile ROM’s?

    Answers Favorite AnswerHi Diva below is a link that will give a simple answer. this helps.Source(s): Experience and wiki answers.ROM is Read only memory. i.e data can write only once.There two types of ROM..ROM.PROMThe difference between ROM and PROM.that is ROM is programmed during manufacturing it means data stored by manufacturing company.PROM is blank memory that a user programmable memory.user can store content on PROM.both ROM and PROM are Read only memory Data can write only once.and its not possible to write so many time.Memories of PROM and ROM are Non-volatile in nature. Its that stored informations can retain even power goes off.

    Leave a Comment