haw do you do the is
Start by reading the lesson text and study the example on how to assign a value to a variable.
my_var = True
The instructions are fairly easy to follow:
Set the following variables to the corresponding values: my_int to the value 7 my_float to the value 1.23 my_bool to the value True
So, I am starting to learn both Python and R at the same time and I was confused why TRUE does not work. In Python, the correct way to type a Boolean in Python is "True" or "False". Not "TRUE" or "FALSE" and not " true" or "false". You will know when you have typed in the Boolean correctly when the Boolean is highlighted orange.
Sadly code is not like English, you have to code exactly the way the computer expects you to in order for Python to do its job.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.