Skip to content
Permalink
7afb70bdca
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
23 lines (19 sloc) 561 Bytes
prog = [ 21, -1, -2, #0
19, 20, -1, #3
18, 0, -2, #6
17, 17, 0, #9
0, 0, 0, #12
0, 0, 0, #15
-1, 1, 13, #18
72, 101, 108, #21
108, 111, 32, #24
87, 111, 114, #27
108, 100, 33, #30
10] #33
pc=0 #Program counter. The pointer to where we are
out="" #Somewhere to collect the output to display at the end
while True:
#Load the next 3 values into a, b, c
a,b,c=prog[pc:pc+3]
#now what?
print out