- 博客(10)
- 收藏
- 关注
转载 6.20
qFile = open("q.txt",mode="r",encoding='utf-8')qText = qFile.read()qFile.close()print(qText)replaceList = [',','.',"'",'\n']for c in replaceList: qText = qText.replace(c,' ')...
2018-06-20 21:44:00
86
转载 6.13
def hanoi(n,a,b,c): if n==1: print(n,a+'->'+c) else: hanoi(n-1,a,c,b) print(n,a+'->'+c) hanoi(n-1,b,a,c)hanoi(7,'A','B','C')转载于:htt...
2018-06-13 21:05:00
93
转载 3
id = '440683199901013256'area = id[0:6]birthday = id[6:14]sex = id [-2]print(area,birthday,sex)if (int(sex) % 2 == 0): print('girl')else: print('boy')for i i...
2018-05-23 20:56:00
87
转载 2
for i in range (12): print(9800+i,chr(9800+i))转载于:https://www.cnblogs.com/whyyxxx/p/9079199.html
2018-05-23 20:31:00
105
转载 1
import turtleturtle.setup(600,400,0,0)turtle.bgcolor('red')turtle.pencolor('yellow')turtle.fillcolor('yellow')def mygoto(x,y): turtle.penup() turtle.goto(x,y) turtl...
2018-05-16 20:49:00
72
转载 猜数字游戏(文明版)
number = 9while True: guess = int(input('请猜一个数字\n')) if guess > number: input('猜的数字大了') elif guess < number: input('猜的数字小了') ...
2018-05-02 20:29:00
214
转载 华摄转换
while True: a = int(input(' 摄氏度转华氏度请按 1\n 华氏度转摄氏度请按 2\n 退出请按 3\n')) if a == 1: c=float(input('请输入摄氏温度:')) f=c*9/5+32 input('{:.2f}°C转换成华氏度为{:.2f}°F'.format(...
2018-04-25 20:47:00
120
转载 理解数据类型与数学运算:求和、温度转换
a=input('请输入一个数字')b=input('请输入另一个数')sum1=int(a)+int(b)print('二数之和是:{}'.format(sum1))a=input('请输入摄氏温度')sum1=int(a)*9/5+32print('华氏温度是:{}'.format(sum1))转载于:https://www.cnb...
2018-04-22 13:11:00
69
转载 输入、输出与Mad Libs 游戏
---恢复内容开始---name=input('请输入姓名')place=input('请输入一个地方')print('我{}就是飞了,飞外边,从悬崖上飞下去,也不吃你{}一口东西!-------真香'.format(name,place))转载于:https://www.cnblogs.com/whyyxxx/p/8906580.html...
2018-04-22 13:03:00
70
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人