In [ ]:
print(張翔鈞)
In [ ]:
print("張翔鈞"*100)
In [25]:
A7
b8
15
In [ ]:
 
In [1]:
import math
a=int(input("a"))
b=math.sqrt(a)
print(b)
a4
2.0
In [ ]:
def f(k,h):
    print(k**h)

f(3,1000)
        
In [21]:
x=input("??")
pp=[1,3,2,5,8,8,5466,6,8565659,9,5,8,58,8]
max(pp[x:])+min(pp[0:])*sum(pp[2:])
??6

TypeErrorTraceback (most recent call last)
<ipython-input-21-5c5a6bbdd278> in <module>()
      1 x=input("??")
      2 pp=[1,3,2,5,8,8,5466,6,8565659,9,5,8,58,8]
----> 3 max(pp[x:])+min(pp[0:])*sum(pp[2:])
      4 

TypeError: slice indices must be integers or None or have an __index__ method
In [ ]:
字庫[康柏賢,博基賢,小賢賢,你很蠢,]
In [ ]:
a=int(input(...))
In [3]:
for i in range(1,102,2):
    h=int(i*2)
    print("2"*h) 
22
222222
2222222222
22222222222222
222222222222222222
2222222222222222222222
22222222222222222222222222
222222222222222222222222222222
2222222222222222222222222222222222
22222222222222222222222222222222222222
222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
In [ ]:
s=int(input("u"))
In [4]:
import turtle
In [4]:
import turtle
tina = turtle.Turtle()
tina.shape("turtle")

tina.penup()
tina.pensize(0.2)
import math
tina.goto(-180,math.sin(-180/10)*80)
tina.pendown()
color=["red","orange","yellow","green","blue","purple"]
def s00(a):
  b=a/3
  tina.color(color[int(b)%6])
  tina.goto(-180+a,80*math.sin((a-180)/15))
  tina.goto(-160+a,80*math.sin((a-160)/15))
  tina.goto(-140+a,80*math.sin((a-140)/15))
  
    
  
for i in range(0,360,3):
    s00(i)

TclErrorTraceback (most recent call last)
<ipython-input-4-f7354a0b5b74> in <module>()
      1 import turtle
----> 2 tina = turtle.Turtle()
      3 tina.shape("turtle")
      4 
      5 tina.penup()

/projects/anaconda3/lib/python3.5/turtle.py in __init__(self, shape, undobuffersize, visible)
   3810                  visible=_CFG["visible"]):
   3811         if Turtle._screen is None:
-> 3812             Turtle._screen = Screen()
   3813         RawTurtle.__init__(self, Turtle._screen,
   3814                            shape=shape,

/projects/anaconda3/lib/python3.5/turtle.py in Screen()
   3660     else return the existing one."""
   3661     if Turtle._screen is None:
-> 3662         Turtle._screen = _Screen()
   3663     return Turtle._screen
   3664 

/projects/anaconda3/lib/python3.5/turtle.py in __init__(self)
   3676         # preserved (perhaps by passing it as an optional parameter)
   3677         if _Screen._root is None:
-> 3678             _Screen._root = self._root = _Root()
   3679             self._root.title(_Screen._title)
   3680             self._root.ondestroy(self._destroy)

/projects/anaconda3/lib/python3.5/turtle.py in __init__(self)
    432     """Root class for Screen based on Tkinter."""
    433     def __init__(self):
--> 434         TK.Tk.__init__(self)
    435 
    436     def setupcanvas(self, width, height, cwidth, cheight):

/projects/anaconda3/lib/python3.5/tkinter/__init__.py in __init__(self, screenName, baseName, className, useTk, sync, use)
   1865                 baseName = baseName + ext
   1866         interactive = 0
-> 1867         self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
   1868         if useTk:
   1869             self._loadtk()

TclError: no display name and no $DISPLAY environment variable
In [5]:
inport random
  File "<ipython-input-5-7aad76a5dc90>", line 1
    inport random
                ^
SyntaxError: invalid syntax
In [6]:
import random
In [ ]:
In [8]:
import random
item=range(1,50)
for i in range(7):
    io=random.choice(item)
    print(io)
    
14
18
46
36
14
12
9
In [3]:
import random
item=range(1,50)
corli=[0]
for i in range(7):
    io=random.choice(item)
    print(io)
    corli.append(io)
    
print(corli)
a=input("第一碼")
b=input("第二碼")
c=input("第三碼")
d=input("第四碼")
e=input("第五碼")
f=input("第六碼")
g=input("特別碼")
corr=0
ap = int(a) in (corli) 
if ap:
    corr=corr+1
bp = int(b) in (corli) 
if bp:
    corr=corr+1
cp = int(c) in (corli) 
if cp:
    corr=corr+1
dp = int(d) in (corli) 
if dp:
    corr=corr+1
ep = int(e) in (corli) 
if ep:
    corr=corr+1
fp = int(f) in (corli) 
if fp:
    corr=corr+1
gp = int(g) in (corli) 
if gp:
    corr=corr+1
corr
print("您中",int(corr),"碼")


 
3
25
12
47
31
21
13
[0, 3, 25, 12, 47, 31, 21, 13]
第一碼9
第二碼3
第三碼2
第四碼25
第五碼31
第六碼13
特別碼5
您中 4 碼
In [ ]:
In [ ]: