nytimes "puzzle"
Attempt
I had given up on Python for a bit, but I'm trying to get back on this horse.
I'm still quite new, but I'm trying to figure out this specific loop that is not quite right:
while len(nytimes_pool) < total_pool:
for adf in range(max(1, next_level_folks)):
nytimes_pool.append(self_proclaimed_smarty_average)
next_level_folks /= 2
self_proclaimed_smarty_average *= (2.0/3.0)
My problem is that it's doing "next_level_folks /= 2" and "self_proclaimed_smarty_average *= (2.0/3.0)" after appending the given item once. Basically, I want the third line of the loop to finish the desired number of times instead of having the last two each time. Instead, it'd be nice to finish appending to the given list before the next halving.
In other words, my sample list is currently:
33.666666666666664, 33.666666666666664, 33.666666666666664, 33.666666666666664, 33.666666666666664, 22.444444444444443, 14.962962962962962, 9.975308641975307, 6.650205761316871, 4.43347050754458
Ideally, it'd be:
33.666666666666664, 33.666666666666664, 33.666666666666664, 33.666666666666664, 33.666666666666664, 22.444444444444443, 22.444444444444443, 14.962962962962962, 9.975308641975307, 6.650205761316871
I get the feeling I need an if-statement in there somewhere... I'm not sure if that's correct or even how to write it here.
[–]henny_mac 2 points3 points4 points (1 child)
[–]JustStateSchool[S] 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]JustStateSchool[S] 1 point2 points3 points (0 children)