New course! Every coder should learn Generative AI!
Try a free lesson+ 2
== is used for comparison for equality. = Is used for assignment. You also want to fix your indentations and make sure you adhere to Python grammar.
x = float(input())
if x > 0:
f = x
else:
f = (x * -1)
print(f)