Post Reply 
Numbers of Armstong WP34s
12-01-2015, 01:07 PM
Post: #7
RE: Numbers of Armstong WP34s
There's another online tool to visualize Python.
Just copy this:
Code:
def armstrong(n, i, a, b):
    if i == 0:
        if a == b:
            print a
    else:
        for d in range(10):
            armstrong(n, i-1, 10*a + d, b + d**n)

armstrong(3, 3, 0, 0)
Paste it into the text-box and press [Visualize Execution].
Now you can step [Forward >] and [< Back] through the program just as you are used to from your calculators. However stepping back will undo the operation.

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Numbers of Armstong WP34s - ggauny@live.fr - 11-30-2015, 07:02 PM
RE: Numbers of Armstong WP34s - Thomas Klemm - 12-01-2015 01:07 PM



User(s) browsing this thread: 1 Guest(s)