week3

Chenxing Fang
Design Computing
Published in
1 min readMar 16, 2017

+=

+= adds another value with the variable's value and assigns the new value to the variable.

>>> x = 3
>>> x += 2
>>> print x
5

-=, *=, /= does similar for subtraction, multiplication and division.

.format

>>>print “{0},{1},{0}”.format(0=9, 1=8)

989

try:

try:

do_a_dumb()

except Exception as e:

print(“You did a dumb”, e)

finally:

print(“we still love you”)

stuck on gene krupa range…

finalllly this is generating a 2-step number list but steps were 5 and 2???!!!still not rite…

Later the result came out with one exceeds the stop… to fix this by append number_list_4 first before loop starts.

--

--