Skip to content
Advertisement

Tag: for-loop

Subtracting from inner list

There is 5 fundraising projects, and the purpose of this program is to substract the amount of money that each of n donators will donate from the desired sum of each project The program partially work, but sometimes python typing “TypeError: ‘NoneType’ object is not subscriptable” and the programm fall What can cause this crash? Thank you for your help!

How to Repeat an Iteration in a For loop, Python 3

I am currently working on implementing the numerical method RKF45 (Runge-Kutta-Fehlberg-45) with adaptive step size into python 3 and I believe I am running into a fundamental loop issue that I cannot resolve. Note, the portion of this numerical method I am having trouble implementing is the adaptive step size. I understand the basic algorithm for how this may be

Iteratively apply a function to an array

I want to create an array that contains g^0, g^1, g^2…. up to g^100 but all to mod50 (apologies if anyone knows how to format this so the powers are properly aligned I need a bit of help!) In my case g = 23, so I would want an array that looks like: I’ve included all my (incorrect) code at

Advertisement