以下為作業17內容
利用 iframe 嵌入投影片:
Jupyter notebook 檔案內容:
In [1]:
def sum10(x):
sum = 0
for i in range(1, x+1):
sum = sum + i
return sum
print(sum10(5),sum10(15))
In [2]:
def sum10(x):
sum = 0
for i in range(1, x+1):
sum = sum + i
return sum
y = sum10(5)
z = sum10(15)
print(y,z)
In [3]:
import random
def sum10(x):
sum = 0
for i in range(1, x+1):
sum = sum + i
return sum
y = sum10(10)
z = sum10(30)
print(y,z)
print(random.random())
In [ ]:
w17_2015_01_08 from 40123210 on Vimeo.