My task is to produce a code that greets the user and asks their name storing their name as username
. Then generates 2 random numbers and an operation. The questio
You have many discrepancies in variable names and indentation. Remember Python is case sensitive. And by the way, the condition in your while loop will cause your program not to ask any questions.
So for example, you created a list of operations called Ops
and then used the random module to select an operation from ops
. Python will inevitably throw an error, as ops
is not actually defined. Instead, you should use Ops
because that is the variable you actually declared, with a capital letter. Again, Python is case sensitive.
Likewise, Python recognizes a difference between questionAsked
and questionsAsked
. It's one or the other, so choose a name and be consistent.