Aug-31-2017, 02:53 AM
(Aug-31-2017, 02:42 AM)ichabod801 Wrote: You rarely use is. The is operator checks to see if both objects are stored in the same place (basically). It checks not just for a string 'italy', but a particular instance of the string 'italy'.
== checks to see if two things are equal (they have the same value). It doesn't care where they're stored.
As for == not working, did you notice the other problem with the or operator? Read this tutorial about the problem.
I was completely wrong between "is" and "==" I spotted the difference and it had nothinggg to do between strings and numbers. I realized the code worked after I deleted the "or" off my statement. I read the tutorial, however, I never really understood it? I see I did the exact same mistake as his example of how to not use it. I was trying to put "or" to tell the computer to let it pass as true if they either put Italy or italy since there was no difference. I don't know what I have to do to let the computer know thats what I meant. The tutorial probably explained it, however, it tripped me out and it confused me.