Help on Syntax


Why is this not correct

Replace this line with your code.


The link leads us to our own code. Best to post your full code here :slight_smile:


This is what it says.
I don’t get what I did incorrectly.


instead of typing to the value literally, use the assignment operator instead, which is =

int = 7

hope this help, cheers!


Hello Guys,

in "my_float = 1.23" can anyone explain why we write 'my_float' and its value as '1.23' ?
I'm new to coding, guide me guys.


Mostly it's because the instructions tell you to do so. But in terms of programming, anything with decimals is considered a float in general terms.

You assign variables by using the = sign with a name on the left side and a value on the right side of it. It is best practice to name the variables something meaningful so that if you write a long piece of code, you won't get confused as to what those variables mean (you can name the variables whatever you want when you work on something yourself). Such as

my_name = "John"

instead of just

x = "John"

In terms of this, it's meaningful to assign a variable name called my_float to a float.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.