s = 'We propose to start by making it possible to teach programming in Python, an existing scripting language, and to focus on creating a new development environment and teaching materials for it'
# input yuour code
# input yuour code
import urllib
s = urllib.urlopen('http://www.python.org').read()
# input yuour code
S = 'Sometiems I feel like a motherless child'
# input yuour code
# input yuour code
# input yuour code
L = range(10)
L
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# input yuour code
# 정렬 결과가 [0, 5, 1, 6, 2, 7, 3, 8, 4, 9]
# input yuour code
# input yuour code
import urllib
import sys
def getpage(url) :
f = urllib.urlopen(url)
return f.read()
text = getpage(sys.argv[1])
print text
# input yuour code
# input yuour code
# input yuour code
T = (1, 2, 3, 4, 5)
T[0] = 100 # 어떻게 되나?
L = # 튜플 T를 리스트로 변환
# input yuour code
L[0] = 100 # 어떻게 되나?
# input yuour code
T2 = # L을 튜플로
def calc(a, b) :
#함수 내용을 작성하세요.
# a+b와 a*b를 계산해서 두 개의 결과를 반환하는 함수
# input yuour code
# x와 y에 결과를 동시에 받는다
import os
p = os.path.abspath('t.py') # 상대 경로를 절대 경로로
os.path.exists(p) # 파일의 존재 여부 검사
os.path.getsize(p) # 파일 크기 알아보기
os.path.split(p) # (head, tail)로 분리. (디렉토리명, 파일명)
your_path=''
os.path.join(your_path, 't.txt') # 디렉토리와 파일명 결합
your_fullpath_filename = ''
os.path.splitext(your_fullpath_filename) # 파일 이름과 확장자 분리
# input yuour code
# input yuour code
s = 'We propose to start by making it possible to teach programming in Python, an existing scripting language, and to focus on creating a new development environment and teaching materials for it.'
# input yuour code
for k in range(10) :
prnt k
# input yuour code
pig ham
cat dog
ham bird
dog pig
cat dog
dog pig
ham bird
pig ham
# input yuour code
pig ham cat
doc ham bird
dog pig
# input yuour code
# input yuour code
# input yuour code
# input yuour code
>>> c = Counter()
>>> c.incr()
>>> c
1
# input yuour code
# input yuour code
# input yuour code
# input yuour code
# input yuour code
# input yuour code