Apr-27-2024, 08:43 AM
(This post was last modified: Apr-27-2024, 08:44 AM by Gribouillis.)
(Apr-27-2024, 07:41 AM)akbarza Wrote: the usage of memory is shown as a negative number! why?I think it is negative because the code deletes the previously calculated list
cubes
. You could correct this by runningdel cubes m3 = ...Another major problem with your code is that the call to
check_even_gene()
creates a generator but it does not actually calculate the data num * num
, so it basically does nothing.Also note that
num * num
is not the cube of the number num
.
« We can solve any problem by introducing an extra level of indirection »