4. Accumulators

Activity: 4.1 ActiveCode (ac_l15_4a_en)

Activity: 4.2 ActiveCode (ac_l15_4b_en)

1i = 1
2fact = 1
3while i <= 10:
4    fact = fact * i
5    i = i + 1
6print ("Fact(10) =% d"% fact)
line that just executed

next line to execute

Print output (drag lower right corner to resize)
Frames
Objects

Activity: CodeLens 4.3 (cl_l15_4_en)

Activity: 4.4 ActiveCode (ac_l15_4c_en)

You have attempted 1 of 5 activities on this page