2018年3月19日

摘要: 阅读全文
posted @ 2018-03-19 11:45 策马啸西风-听雪 阅读(120) 评论(0) 推荐(0)
 
摘要: HTML基础一观 阅读全文
posted @ 2018-03-19 11:44 策马啸西风-听雪 阅读(274) 评论(0) 推荐(0)

2017年11月16日

摘要: # 方法一 :使用切片'''# s = 'asdfasdf'# s[::-1] 反向切片技术然后定义为一个函数def f(x): return x[::-1]a = [1,2,3,4,5,6,7,8,9,0]print(f(a))print(f('nihaoya'))print(f('hellowo 阅读全文
posted @ 2017-11-16 20:32 策马啸西风-听雪 阅读(202) 评论(0) 推荐(0)
 
摘要: import re'''#统计单词元音字母数量word = input('please enter your word:')pattern = re.compile(r'[aeiou]') #reg = r'[aeiou]' pattern = re.compile(reg)the_letters 阅读全文
posted @ 2017-11-16 19:56 策马啸西风-听雪 阅读(246) 评论(0) 推荐(0)

2017年10月31日

摘要: '''思路:定义一个函数匹配模式一:利用正则表达式 匹配出单词的第一个辅音音素字母x二:字母找出来后直接用str 的单词,减去x 然后 + xay'''import rex = input('please enter your words:')def game_pigwords(x): reg = 阅读全文
posted @ 2017-10-31 20:11 策马啸西风-听雪 阅读(476) 评论(0) 推荐(0)
 
摘要: word = input('enter your word:')word1 = list(word)word2 = list(word)[::-1]if word1 == word2: print('该词是回文词')else: print('不是回文词') 阅读全文
posted @ 2017-10-31 20:10 策马啸西风-听雪 阅读(136) 评论(0) 推荐(0)
 
摘要: utf-8 python3.6# 思路:定位各个五角星的中心点,然后从中心点出发进行绘图。import mathimport turtleturtle.screensize(960, 640, "red")# turtle.hideturtle() # 隐藏箭头turtle.speed(10) # 阅读全文
posted @ 2017-10-31 20:08 策马啸西风-听雪 阅读(168) 评论(0) 推荐(0)