摘要:
import turtle turtle.setup(600,400,0,0) turtle.bgcolor('red') turtle.pencolor('yellow') turtle.fillcolor('yellow') turtle.penup() turtle.goto(-250,100 阅读全文
阅读排行榜
函数定义与使用 字符串类型
2018-05-16 20:32 by lulululululululu, 330 阅读, 收藏,
摘要:
stuNum = '201709080051' print('年级是:'+stuNum[0:4]) print('专业编号是:'+stuNum[4:9]) print('序号是:'+stuNum[-3:]) IDNo = '650102199908240726' print('性别是;'+IDNo[-2]) import turtle turtle.bgcolor("red") t... 阅读全文
条件语句,while循环语句:完整的温度转换程序
2018-04-25 21:24 by lulululululululu, 308 阅读, 收藏,
摘要:
a = int(input('摄氏度转换为华氏温度请按 1\n华氏温度转化为摄氏度请按 2\n')) if a == '1': c = float(input('请输入摄氏温度:')) f = c*9/5+32 print('摄氏{:.2f}的华氏为{:.2f}'.format(c,f)) else: f = float(input('请输入华氏温度:')) ... 阅读全文
文件操作
2018-05-30 20:50 by lulululululululu, 229 阅读, 收藏,
摘要:
classmates = ['Michael','Bob','Tracy'] classmates.append('Rose') classmates.insert(1,'Jack') classmates.pop() classmates.pop(0) classmates[0] = 'Tom' print(classmates) import turtle turtle.spee... 阅读全文
程序执行流程/布尔类型与布尔:运算猜数字游戏;库的使用:turtle
2018-05-02 21:37 by lulululululululu, 225 阅读, 收藏,
摘要:
myNumber = 7 while True: guess = int(input('猜猜这个数字是什么')) if guess > myNumber: input('这个数字大了') elif guess < myNumber: input('这个数字小了') else: print('猜对了') ... 阅读全文
浙公网安备 33010602011771号