I see a few problems with the code.
new_text = int(new_text)
new_text = 0.25*new_text
if new_text == nd:
new_text should be an integer or a float. It can't be both. First you cast the String as an integer (a whole number), then you multiply by 0.25, which will result in a float (which will likely cause issues). If you want float, then cast as a float on the first line. Also, when you compare new_text to nd, what is nd? Basically you will be comparing two floats for equality, which almost never works. Because floating point numbers are not exact. If you must compare, it should be within some small margin of error, like:
if abs(next_text - nd) < 0.001:
Also, you have code like this:
if new_text2 == nd:
count+=1
else:
count+=0
count+=0 does nothing. It just adds zero to a number, which is the same number. So that might not be what you want, or you can just remove the else clause altogether.
Finally, you probably want to put your input code on _input or use signals.
func _input(event):
if event.is_action_just_pressed("ui_accept"):
_randomize_my_variable()
# rest of code ...
or
func _ready():
get_node("LineEdit").connect("pressed", self, "on_click")
func on_click():
_randomize_my_variable()
# rest of code ...