Why python code not working

NbForSink = 0;

Mass = 14.5;

Volume = 450.00

anser = False;

while True:{

NbForSink + 1;

Dense = 0;

if anser < 1:{

Mass / Volume = Dense;

Dense > 1 = anser;}

else:{

Mass = Mass + 2.5;}

}

}

Are you definitely looking for help with Python? The code above isn’t valid Python syntax, the curly brackets in particular { have a different meaning and do not denote code blocks (that’s generally controlled by indentation instead).

2 Likes

while True:{ - Google Search

Shows what Google thinks…


Not to mention syntax errors, such as invalid left hand side in an assignment. The member needs to be a little more clear about where this code is from, and what exercise it relates to.