![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
Python
qq_53139318
这个作者很懒,什么都没留下…
展开
-
Python中and和or的输出结果
A and B A or Band A的值为false 输出结果 false A的值为0 0 A的值为ture或非0 B的值 or A的值为ture或非0 A的值 A的值为false或0 B的值原创 2021-10-06 22:44:56 · 1128 阅读 · 0 评论 -
查询n以内的素数Python
from math import*n=int (input("请输入n:"))m=int (sqrt(n))p=[i for i in range(n+1)]for i in range(2,m+1): if p[i]: for j in range(2*i,n+1,i): p[j]=0for i in range(2,n+1): if p[i]: print(p[i])结果:...原创 2021-10-06 22:30:48 · 414 阅读 · 1 评论 -
奥运五环Python
import turtleturtle.pensize(10)turtle.color("blue")turtle.penup()turtle.goto(-110,-25)turtle.pendown()turtle.circle(45)turtle.color("black")turtle.penup()turtle.goto(0,-25)turtle.pendown()turtle.circle(45)turtle.color("red")turtle.penup().原创 2021-10-06 22:26:26 · 101 阅读 · 0 评论