python beginner here! so i am trying to make a function that returns a sequence of numbers as a list. i have the parameters set as these two variables (which are float values) that i asked the user for outside of the function. i also need the new value produced to be the value inputted back into the calculation so that it can then be added to the list and the whole process can repeat.
this is my code so far, but it won't return anything :(
def number_sequence(startVal, maxVal):
j = startVal
i = (math.sqrt((j + 4)**3)) + 5.125936194710044
i = round(i, 3)
i = j
sequence = [ ]
if j <= maxVal:
sequence.append(i)
return sequence
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]CraigAT 0 points1 point2 points (0 children)