I know how to generate the random numbers for the equation but I can't for the life of me figure out how to randomly generate the operators (* / + -)How can I do this? This is driving me insane. Please help!

If its not just printing a string that you want, to get the actual calculation done with random maths operator you could do as shown in the following code.The first is just the maths the second is return the full equation as a string.

Due to the reasons discussed here we will be moving to python-forum.io/ on October 1 2016This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.

Due to the reasons discussed here we will be moving to python-forum.io on October 1st, 2016.This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.

Due to the reasons discussed here we will be moving to python-forum.io on October 1st, 2016.This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.

Wow! Thanks for all the help...I ended up getting it to work (at least it appears to work) before my post was approved...lolBtw, I am learning to program in Python 3.3.0 and the code that most of you guys put up appears to be either way too advanced for me at this point or a different version of Python(?)

I need to get this to loop so that if the user enters the wrong answer it keeps asking them to try again indefintely...well at least until they get it right...

For some reason it is not working correctly...i believe it is because of my assignments of the equations ex. mult = (num1 * num2)...

Why won't this work? Can anyone help?Here is the original code that worked:

The user's input will never be equal to that.This is the reason you never leave the while loop.

You need to make sure correct only contains the actual correct answer.Both Yoriz and metulburr showed ways how to do that, or you can try coming up with your own.

stargirl wrote:Btw, I am learning to program in Python 3.3.0 and the code that most of you guys put up appears to be either way too advanced for me at this point or a different version of Python(?)

Most people still use python 2.x, since it's still the better supported version, but the differences aren't huge.The code posted is not very advanced, but it's understandable if you, as a beginner, don't understand all of it.