165 if len(self.value) > 0:
166 self.value = self.value[:-1]
167 self.draw_text(self.value, center=True)
168 # replace value with input value if enter or return is pressed and value is a float169 elif key in ("return", "enter"):
170 if self.value != "" and EzUtils.is_float(self.value):
171 self.input_value = float(self.value)
116 break
117 num_iter += 1
118
119 # define the color based on the number of iterations and set the pixel color in the screen array120 screen_array[x, y] = iter_gradient_generator(
121 num_iter, max_iter, saturation, lightness
122 )
107 # define the initial value of z and the number of iterations
108 z = 0
109 num_iter = 0
110 # iterate the function until the number is diverging or the max iterations is reached111 for i in range(max_iter):
112 # julia set formula
113 z = z ** 2 + c
79 break
80 num_iter += 1
81
82 # define the color based on the number of iterations and set the pixel color in the screen array 83 screen_array[x, y] = iter_gradient_generator(
84 num_iter, max_iter, saturation, lightness
85 )
70 # number of iterations
71 num_iter = 0
72
73 # iterate the function until the number is diverging or the max iterations is reached 74 for i in range(max_iter):
75 # julia set formula
76 z = z ** 2 + c
Docstring line lengths are recommended to be no greater than 79 characters.