I am trying to do lesson 7 on python where i have to create a certain variable and assign it to something.The problem is that the example is showing me
cats = 3
Whereas the hint shows me
example_variable = True
Any suggestions?I have tried every combanations i know but no luck.
We can better help with your question if we know the exercise you are currently on. Please post a link. Thanks.
cats = 3
is a valid assignment statement. The variable is always on the left side and the assigned value on the right side of the equals sign.
= is known as the assignment operator in Python and is not used to test equality, only to assign something to a variable.
cats == 3
would be True, given the earlier assignment. In the above we compared the value referenced by
cats with the number literal,
3 in a test for identity or equality. Since we earlier assigned
cats, the yield of the above comparison is
We’ll look more into your problem once we have a link to the exercise.
thank you for the suggestion and the help but while i was messing around i had found the wright code.
Thank you for the help still
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.