Hi I want to calculate the distribution of continued fraction expansion (of N up to 10000). I think I need to choose a random variable x and calculate its cfe for n = 15, then store the counts in a dictionary. Then, choose another random variable x and continue the calculation until the size of the dictionary reaches 10000.
But I just can't let my program understand this idea.
User Profile
Collapse
Profile Sidebar
Collapse
pyask
Last Activity: Oct 3 '11, 11:26 AM
Joined: Sep 3 '11
Location:
-
to calculate the universal distribution of continued fraction expansion
Hi all,
I'm studying python program in uni.
my lecture asks us to calculate the universal distribution of continued fraction expansion
But I always have an error says: TypeError: 'builtin_functi on_or_method' object is not subscriptable.
here's my algorithm:
...Code:def universal_distro(N=10000): import random x = random.random() g = list() m = dict() o = dict()
No activity results to display
Show More
Leave a comment: