摘要: a=int(input())b=int(input())n=0sum=0for i in range (1,b+1): n = (n * 10)+a sum = sum + nprint(sum) 阅读全文
posted @ 2020-10-19 19:03 达尔文的第三人称 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 2 3 4 5 6 7 8 import math for i in range(100, 1000): x = math.floor(i/100) #获得百位数 y = math.floor((i - x*100)/10) #获得十位数 z = i - math.floor(i/10) *10 # 阅读全文
posted @ 2020-10-19 19:01 达尔文的第三人称 阅读(54) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python3 for x in range(1,23): y = 35 - x if 4*x + 2*y == 94: print('兔子有%s只,鸡有%s只'%(x, y)) 阅读全文
posted @ 2020-09-28 18:39 达尔文的第三人称 阅读(116) 评论(0) 推荐(0) 编辑
摘要: #画国际象棋盘,小格边长为widthimport turtleturtle.speed(0)width = eval(input()) #画黑格def drawSquare(width): turtle.pendown() turtle.begin_fill() turtle.fillcolor(" 阅读全文
posted @ 2020-09-28 18:08 达尔文的第三人称 阅读(165) 评论(0) 推荐(0) 编辑
摘要: from turtle import *pensize(3)penup()pencolor("black")reset()speed(10)pendown()circle(100,180)circle(200,180)circle(100,-180)fillcolor('black')begin_f 阅读全文
posted @ 2020-09-28 18:07 达尔文的第三人称 阅读(106) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv=" 阅读全文
posted @ 2020-09-28 18:06 达尔文的第三人称 阅读(76) 评论(0) 推荐(0) 编辑
摘要: from turtle import*seth(-120)for i in range(3): for i in range(3): fd(100) left(120) left(60)right(60)fd(100)seth(-60)for i in range(3): fd(100) right 阅读全文
posted @ 2020-09-28 18:05 达尔文的第三人称 阅读(117) 评论(0) 推荐(0) 编辑
摘要: import turtlenumber = int(input())turtle.screensize(600,500,'white')turtle.pensize(3)turtle.pencolor('blue')turtle.fillcolor('yellow')turtle.begin_fil 阅读全文
posted @ 2020-09-28 18:04 达尔文的第三人称 阅读(89) 评论(0) 推荐(0) 编辑
摘要: from turtle import *# 设置窗体的大小和位置,参数依次为窗体的宽、高、相对于桌面起始点的横坐标、纵坐标setup(600,400,500,200)# 画笔颜色color("red")# 画笔宽度pensize(3)# 画一个半径为20的圆circle(20)# 修改画笔宽度pen 阅读全文
posted @ 2020-09-28 18:01 达尔文的第三人称 阅读(188) 评论(0) 推荐(0) 编辑
摘要: #请替换括号中的提示性文字使程序可运行 import turtle turtle.pensize(数字,画笔宽度 )turtle.pencolor("画笔颜色")turtle.fillcolor("填充颜色") turtle.begin_fill()for i in range(数字,循环次数): 阅读全文
posted @ 2020-09-28 17:59 达尔文的第三人称 阅读(86) 评论(0) 推荐(0) 编辑