Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Jupyter notebook 林庭伃.ipynb

14 views
Kernel: Anaconda (Python 3)
a=4 b=8 c=a*b print(c)
a=input("請輸入a-------->") b=input("請輸入b-------->") c=a+b print(c)
def f(x,y): print ("這是",x,"這是",y) f(2,3)
這是 2 這是 3
a=[20,30,300,400] a[2]
300
for i in range(100): print(" ",x"*i)
File "<ipython-input-9-044afd916228>", line 2 print(" ",x"*i) ^ SyntaxError: EOL while scanning string literal
a=[ ,1,2,3,4,5,6,7,8,9,10,11,12]
a=input("輸入月份") b=spring c=summer d=fall e=winter if a<4: print(spring)
File "<ipython-input-1-2e5bcab9350b>", line 7 print(b) ^ IndentationError: expected an indented block
def score(姓名,,,): print(姓名) 平均=(++)/3 return 平均
a=[1,2,3] a max
File "<ipython-input-22-0e69ae7b3bd7>", line 2 a max ^ SyntaxError: invalid syntax
NameErrorTraceback (most recent call last) <ipython-input-14-3ef3908cabc7> in <module>() ----> 1 a[1] NameError: name 'a' is not defined
a=[] for i in range(6): ia= input('number ==') d=int(ia) if 0<d<50: a.append(d) else: print('error reapeat again')
number ==1 number ==2 number ==3 number ==4 number ==5 number ==6